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

mitk::LookupTableSource Class Reference
[Process Classes]

Base class for all objects which have an object of type mitkLookupTable as output. More...

#include <mitkLookupTableSource.h>

Inheritance diagram for mitk::LookupTableSource:
Inheritance graph
[legend]

List of all members.

Public Types

typedef LookupTableSource Self
typedef BaseProcess Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer
typedef mitk::LookupTable OutputType
typedef OutputType::Pointer OutputTypePointer
typedef itk::DataObject::Pointer DataObjectPointer

Public Member Functions

virtual const char * GetClassName () const
virtual DataObjectPointer MakeOutput (unsigned int idx)
void GenerateInputRequestedRegion ()
void SetOutput (OutputType *output)
virtual void GraftOutput (OutputType *output)
OutputTypeGetOutput ()
OutputTypeGetOutput (unsigned int idx)

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 LookupTableSource ()
virtual ~LookupTableSource ()

Detailed Description

Base class for all objects which have an object of type mitkLookupTable as output.

Base class for all objects which have an object of type mitkLookupTable as output. It is assumed, that mitkLookupTableSources do not provide support for streaming, that is, that the requested region is always the largest possible region.

Definition at line 40 of file mitkLookupTableSource.h.


Member Typedef Documentation

typedef itk::SmartPointer<const Self> mitk::LookupTableSource::ConstPointer
typedef itk::DataObject::Pointer mitk::LookupTableSource::DataObjectPointer

Definition at line 52 of file mitkLookupTableSource.h.

Reimplemented in mitk::SeedsImageLookupTableSource, and mitk::USLookupTableSource.

Definition at line 46 of file mitkLookupTableSource.h.

Definition at line 50 of file mitkLookupTableSource.h.

typedef itk::SmartPointer<Self> mitk::LookupTableSource::Pointer

Constructor & Destructor Documentation

mitk::LookupTableSource::LookupTableSource (  ) [protected]

Definition at line 21 of file mitkLookupTableSource.cpp.

References MakeOutput().

{
    // Create the output. We use static_cast<> here because we know the default
    // output must be of type TOutputImage
    OutputType::Pointer output = static_cast<OutputType*>( this->MakeOutput( 0 ).GetPointer() );

    if ( output.GetPointer() == NULL )
    {
        itkWarningMacro(<<"Output could not be created!");
    }

    this->ProcessObject::SetNumberOfRequiredOutputs( 1 );
    this->ProcessObject::SetNthOutput( 0, output.GetPointer() );
}
mitk::LookupTableSource::~LookupTableSource (  ) [protected, virtual]

Definition at line 37 of file mitkLookupTableSource.cpp.

{}

Member Function Documentation

void mitk::LookupTableSource::GenerateInputRequestedRegion (  )

Generates the input requested region simply by calling the equivalent method of the superclass.

Definition at line 88 of file mitkLookupTableSource.cpp.

virtual const char* mitk::LookupTableSource::GetClassName (  ) const [virtual]
mitk::LookupTableSource::OutputType * mitk::LookupTableSource::GetOutput ( unsigned int  idx )

Returns the n'th output of the lookup table source

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

Definition at line 79 of file mitkLookupTableSource.cpp.

{
    return static_cast<OutputType*> ( this->ProcessObject::GetOutput( idx ) );
}
mitk::LookupTableSource::OutputType * mitk::LookupTableSource::GetOutput ( void   )

Returns the output with index 0 of the lookup table source

Returns:
the output

Definition at line 63 of file mitkLookupTableSource.cpp.

{
    if ( this->GetNumberOfOutputs() < 1 )
    {
        return 0;
    }

    if ( static_cast<OutputType*> ( this->ProcessObject::GetOutput( 0 ) ) == NULL )
        itkWarningMacro(<<"Output is NULL!");
    return static_cast<OutputType*> ( this->ProcessObject::GetOutput( 0 ) );
}
void mitk::LookupTableSource::GraftOutput ( OutputType output ) [virtual]

Replacement of the SetOutput method. I think it is not yet correcly implemented, so you should better not use it.

Parameters:
outputthe intended output of the lookup table source.

Definition at line 97 of file mitkLookupTableSource.cpp.

{
    OutputType * output = this->GetOutput();

    if ( output && graft )
    {
        // grab a handle to the bulk data of the specified data object
        // output->SetPixelContainer( graft->GetPixelContainer() );

        // copy the region ivars of the specified data object
        // output->SetRequestedRegion( graft->GetRequestedRegion() );
        // output->SetLargestPossibleRegion( graft->GetLargestPossibleRegion() );
        // output->SetBufferedRegion( graft->GetBufferedRegion() );

        // copy the meta-information
        output->CopyInformation( graft );
    }
}
mitk::LookupTableSource::DataObjectPointer mitk::LookupTableSource::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 44 of file mitkLookupTableSource.cpp.

Referenced by LookupTableSource().

{
    return OutputType::New().GetPointer();
}
static Pointer mitk::LookupTableSource::New (  ) [static]
void mitk::LookupTableSource::SetOutput ( OutputType output )

Allows to set the output of the lookup-table source. According to the itk documentation this method is outdated and should not be used. Instead GraftOutput(...) should be used.

Parameters:
outputthe intended output of the lookup table source

Definition at line 53 of file mitkLookupTableSource.cpp.

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