Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

mitk::MeshSource Class Reference
[Process Classes]

Superclass of all classes generating point sets (instances of class mitk::Mesh) as output. More...

#include <mitkMeshSource.h>

List of all members.

Public Types

typedef mitk::Mesh OutputType
typedef OutputType::Pointer OutputTypePointer

Public Member Functions

 mitkClassMacro (MeshSource, itk::ProcessObject)
virtual itk::DataObject::Pointer MakeOutput (unsigned int idx)
virtual void SetOutput (OutputType *output)
virtual void SetOutput (unsigned int idx, OutputType *output)
virtual OutputTypeGetOutput ()
virtual OutputTypeGetOutput (unsigned int idx)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 MeshSource ()
virtual ~MeshSource ()

Detailed Description

Superclass of all classes generating point sets (instances of class mitk::Mesh) 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.

Definition at line 38 of file mitkMeshSource.h.


Member Typedef Documentation

Definition at line 43 of file mitkMeshSource.h.

Definition at line 47 of file mitkMeshSource.h.


Constructor & Destructor Documentation

mitk::MeshSource::MeshSource (  ) [protected]

Definition at line 22 of file mitkMeshSource.cpp.

References MakeOutput(), and SetOutput().

{
    // Create the output.
    OutputType::Pointer output = dynamic_cast<OutputType*> ( this->MakeOutput( 0 ).GetPointer() );
    assert (output.IsNotNull());
    this->SetNumberOfRequiredInputs(0);
    this->SetNumberOfOutputs( 1 );
    this->SetOutput(0, output.GetPointer());  
}
mitk::MeshSource::~MeshSource (  ) [protected, virtual]

Definition at line 35 of file mitkMeshSource.cpp.

{
}

Member Function Documentation

mitk::MeshSource::OutputType * mitk::MeshSource::GetOutput ( void   ) [virtual]

Returns the output with index 0 of the point set source

Returns:
the output

Definition at line 66 of file mitkMeshSource.cpp.

References GetOutput().

Referenced by GetOutput().

{
    if ( this->GetNumberOfOutputs() < 1 )
    {
        return 0;
    }
    else
    {
        return dynamic_cast<OutputType*> ( this->GetOutput( 0 ) );
    }
}
mitk::MeshSource::OutputType * mitk::MeshSource::GetOutput ( unsigned int  idx ) [virtual]

Returns the n'th output of the point set source

Parameters:
idxthe index of the wanted output
Returns:
the output with index idx.

Definition at line 81 of file mitkMeshSource.cpp.

{
    return dynamic_cast<OutputType*> ( this->ProcessObject::GetOutput( idx ) );
}
itk::DataObject::Pointer mitk::MeshSource::MakeOutput ( unsigned int  idx ) [virtual]

Allocates a new output object and returns it. Currently the index idx is not evaluated.

Parameters:
idxthe index of the output for which an object should be created
Returns:
the new object

Definition at line 42 of file mitkMeshSource.cpp.

Referenced by MeshSource().

{
    return OutputType::New().GetPointer();
}
mitk::MeshSource::mitkClassMacro ( MeshSource  ,
itk::ProcessObject   
)
static Pointer mitk::MeshSource::New (  ) [static]
void mitk::MeshSource::SetOutput ( unsigned int  idx,
OutputType output 
) [virtual]

Allows to set the n-th output of the point set source.

Parameters:
idxThe index of the output
outputThe intended output of the point set source

Definition at line 58 of file mitkMeshSource.cpp.

{
    this->ProcessObject::SetNthOutput(idx, output);    
}
void mitk::MeshSource::SetOutput ( OutputType output ) [virtual]

Allows to set the output of the point set source.

Parameters:
outputthe intended output of the point set source

Definition at line 50 of file mitkMeshSource.cpp.

Referenced by MeshSource().

{
    this->ProcessObject::SetNthOutput( 0, output );
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines