Superclass of all classes generating data tree nodes (instances of class mitk::DataNode) as output. More...
#include <mitkDataNodeSource.h>
Public Types | |
typedef mitk::DataNode | OutputType |
typedef OutputType::Pointer | OutputTypePointer |
Public Member Functions | |
mitkClassMacro (DataNodeSource, itk::ProcessObject) | |
virtual itk::DataObject::Pointer | MakeOutput (unsigned int idx) |
virtual void | SetOutput (OutputType *output) |
virtual void | SetOutput (unsigned int idx, OutputType *output) |
virtual OutputType * | GetOutput () |
virtual OutputType * | GetOutput (unsigned int idx) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
DataNodeSource () | |
virtual | ~DataNodeSource () |
Superclass of all classes generating data tree nodes (instances of class mitk::DataNode) as output.
In itk and vtk the generated result of a ProcessObject is only guaranteed to be up-to-date, when Update() of the ProcessObject or the generated DataObject is called immediately before access of the data stored in the DataObject. This is also true for subclasses of mitk::BaseProcess and thus for mitk::DataNodeSource.
Definition at line 38 of file mitkDataNodeSource.h.
Definition at line 43 of file mitkDataNodeSource.h.
Definition at line 47 of file mitkDataNodeSource.h.
mitk::DataNodeSource::DataNodeSource | ( | ) | [protected] |
Definition at line 22 of file mitkDataNodeSource.cpp.
References MakeOutput(), and SetOutput().
{ // Create the output. OutputType::Pointer output = dynamic_cast<OutputType*> ( this->MakeOutput( 0 ).GetPointer() ); assert (output.IsNotNull()); this->SetNumberOfOutputs( 1 ); this->SetOutput(0, output.GetPointer()); }
mitk::DataNodeSource::~DataNodeSource | ( | ) | [protected, virtual] |
Definition at line 34 of file mitkDataNodeSource.cpp.
{ }
mitk::DataNodeSource::OutputType * mitk::DataNodeSource::GetOutput | ( | ) | [virtual] |
Returns the output with index 0 of the base data source
Definition at line 65 of file mitkDataNodeSource.cpp.
References GetOutput().
Referenced by GetOutput().
{ if ( this->GetNumberOfOutputs() < 1 ) { return 0; } else { return dynamic_cast<OutputType*> ( this->GetOutput( 0 ) ); } }
mitk::DataNodeSource::OutputType * mitk::DataNodeSource::GetOutput | ( | unsigned int | idx ) | [virtual] |
Returns the n'th output of the base data source
idx | the index of the wanted output |
Definition at line 80 of file mitkDataNodeSource.cpp.
{ return dynamic_cast<OutputType*> ( this->itk::ProcessObject::GetOutput( idx ) ); }
itk::DataObject::Pointer mitk::DataNodeSource::MakeOutput | ( | unsigned int | idx ) | [virtual] |
Allocates a new output object and returns it. Currently the index idx is not evaluated.
idx | the index of the output for which an object should be created |
Definition at line 41 of file mitkDataNodeSource.cpp.
Referenced by DataNodeSource().
{ return OutputType::New().GetPointer(); }
mitk::DataNodeSource::mitkClassMacro | ( | DataNodeSource | , |
itk::ProcessObject | |||
) |
static Pointer mitk::DataNodeSource::New | ( | ) | [static] |
Reimplemented in mitk::DataNodeFactory.
void mitk::DataNodeSource::SetOutput | ( | unsigned int | idx, |
OutputType * | output | ||
) | [virtual] |
Allows to set the n-th output of the base data source.
output | the intended output of the base data source |
Definition at line 57 of file mitkDataNodeSource.cpp.
{ this->itk::ProcessObject::SetNthOutput(idx, output); }
void mitk::DataNodeSource::SetOutput | ( | OutputType * | output ) | [virtual] |
Allows to set the output of the base data source.
output | the intended output of the base data source |
Definition at line 49 of file mitkDataNodeSource.cpp.
Referenced by DataNodeSource().
{ this->itk::ProcessObject::SetNthOutput( 0, output ); }