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

mitk::PointSetSource Class Reference
[Process Classes]

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

#include <mitkPointSetSource.h>

Inheritance diagram for mitk::PointSetSource:
Inheritance graph
[legend]
Collaboration diagram for mitk::PointSetSource:
Collaboration graph
[legend]

List of all members.

Public Types

typedef PointSet OutputType
typedef OutputType::Pointer OutputTypePointer

Public Member Functions

 mitkClassMacro (PointSetSource, BaseProcess)
virtual itk::DataObject::Pointer MakeOutput (unsigned int idx)
virtual void SetOutput (OutputType *output)
virtual void GraftOutput (OutputType *output)
virtual void GraftNthOutput (unsigned int idx, OutputType *output)
virtual OutputTypeGetOutput ()
virtual OutputTypeGetOutput (unsigned int idx)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 PointSetSource ()
virtual ~PointSetSource ()

Detailed Description

Superclass of all classes generating point sets (instances of class mitk::PointSet) 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 37 of file mitkPointSetSource.h.


Member Typedef Documentation

Reimplemented in mitk::PointSetToPointSetFilter.

Definition at line 42 of file mitkPointSetSource.h.

Definition at line 46 of file mitkPointSetSource.h.


Constructor & Destructor Documentation

mitk::PointSetSource::PointSetSource (  ) [protected]

Definition at line 22 of file mitkPointSetSource.cpp.

References MakeOutput(), and mitk::BaseProcess::SetNthOutput().

{
  // Create the output.
  OutputType::Pointer output = dynamic_cast<OutputType*>(this->MakeOutput(0).GetPointer()); 
  Superclass::SetNumberOfRequiredInputs(0);
  Superclass::SetNumberOfRequiredOutputs(1);
  Superclass::SetNthOutput(0, output.GetPointer());
}
mitk::PointSetSource::~PointSetSource (  ) [protected, virtual]

Definition at line 34 of file mitkPointSetSource.cpp.

{
}

Member Function Documentation

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

Returns the output with index 0 of the point set source

Returns:
the output

Definition at line 71 of file mitkPointSetSource.cpp.

{
    if ( this->GetNumberOfOutputs() < 1 )
    {
        return 0;
    }
    else
    {
      return dynamic_cast<OutputType*>
                         (this->BaseProcess::GetOutput(0));
    }
}
mitk::PointSetSource::OutputType * mitk::PointSetSource::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 87 of file mitkPointSetSource.cpp.

{
    return dynamic_cast<OutputType*> ( this->ProcessObject::GetOutput( idx ) );
}
void mitk::PointSetSource::GraftNthOutput ( unsigned int  idx,
OutputType output 
) [virtual]

Definition at line 63 of file mitkPointSetSource.cpp.

{
  itkWarningMacro(<< "GraftNthOutput(): This method is not yet implemented for mitk. Implement it before using!!" );
  assert(false);
}
void mitk::PointSetSource::GraftOutput ( OutputType output ) [virtual]

Definition at line 58 of file mitkPointSetSource.cpp.

{
  this->GraftNthOutput(0, graft);
}
itk::DataObject::Pointer mitk::PointSetSource::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 41 of file mitkPointSetSource.cpp.

Referenced by mitk::ContourSetToPointSetFilter::ContourSetToPointSetFilter(), and PointSetSource().

{
    return OutputType::New().GetPointer();
}
mitk::PointSetSource::mitkClassMacro ( PointSetSource  ,
BaseProcess   
)
static Pointer mitk::PointSetSource::New (  ) [static]
void mitk::PointSetSource::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 49 of file mitkPointSetSource.cpp.

{
  itkWarningMacro(<< "SetOutput(): This method is slated to be removed from ITK.  Please use GraftOutput() in possible combination with DisconnectPipeline() instead." );
    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