OTB  9.0.0
Orfeo Toolbox
Public Types | Public Member Functions | Static Public Member Functions | List of all members
otb::PathListSource< TOutputPath > Class Template Reference

#include <otbPathListSource.h>

+ Inheritance diagram for otb::PathListSource< TOutputPath >:
+ Collaboration diagram for otb::PathListSource< TOutputPath >:

Public Types

typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::DataObject::Pointer DataObjectPointer
 
typedef itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
 
typedef OutputPathListType::ConstPointer OutputPathListConstPointerType
 
typedef OutputPathListType::Pointer OutputPathListPointerType
 
typedef Superclass::OutputListType OutputPathListType
 
typedef OutputPathType::Pointer OutputPathPointerType
 
typedef TOutputPath OutputPathType
 
typedef itk::SmartPointer< SelfPointer
 
typedef PathListSource Self
 
typedef ObjectListSource< ObjectList< TOutputPath > > Superclass
 
- Public Types inherited from otb::ObjectListSource< ObjectList< TOutputPath > >
typedef itk::SmartPointer< const SelfConstPointer
 
typedef itk::DataObject::Pointer DataObjectPointer
 
typedef itk::ProcessObject::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
 
typedef ObjectList< TOutputPath > ::Pointer OutputListPointer
 
typedef ObjectList< TOutputPath > OutputListType
 
typedef itk::SmartPointer< SelfPointer
 
typedef ObjectListSource Self
 
typedef itk::ProcessObject Superclass
 

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
- Public Member Functions inherited from otb::ObjectListSource< ObjectList< TOutputPath > >
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 
DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
void GraftOutput (itk::DataObject *graft)
 
void GraftNthOutput (DataObjectPointerArraySizeType idx, itk::DataObject *graft)
 
OutputListTypeGetOutput (void)
 
OutputListTypeGetOutput (DataObjectPointerArraySizeType idx)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from otb::ObjectListSource< ObjectList< TOutputPath > >
static Pointer New ()
 
 PathListSource ()
 
 ~PathListSource () override
 
 PathListSource (const Self &)=delete
 
void operator= (const Self &)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from otb::ObjectListSource< ObjectList< TOutputPath > >
 ObjectListSource ()
 
 ~ObjectListSource () override
 
void PrintSelf (std::ostream &os, itk::Indent indent) const override
 
virtual void AllocateOutputs ()
 
void GenerateData (void) override
 

Detailed Description

template<class TOutputPath>
class otb::PathListSource< TOutputPath >

Base class for filters with a PathList output type.

PathListSource is the base class for all filters producing a PathList. This class defines the GetOutput().

Definition at line 45 of file otbPathListSource.h.

Member Typedef Documentation

◆ ConstPointer

template<class TOutputPath >
typedef itk::SmartPointer<const Self> otb::PathListSource< TOutputPath >::ConstPointer

Definition at line 52 of file otbPathListSource.h.

◆ DataObjectPointer

template<class TOutputPath >
typedef itk::DataObject::Pointer otb::PathListSource< TOutputPath >::DataObjectPointer

Some convenient typedefs.

Definition at line 58 of file otbPathListSource.h.

◆ DataObjectPointerArraySizeType

template<class TOutputPath >
typedef itk::ProcessObject::DataObjectPointerArraySizeType otb::PathListSource< TOutputPath >::DataObjectPointerArraySizeType

Definition at line 62 of file otbPathListSource.h.

◆ OutputPathListConstPointerType

template<class TOutputPath >
typedef OutputPathListType::ConstPointer otb::PathListSource< TOutputPath >::OutputPathListConstPointerType

Definition at line 68 of file otbPathListSource.h.

◆ OutputPathListPointerType

template<class TOutputPath >
typedef OutputPathListType::Pointer otb::PathListSource< TOutputPath >::OutputPathListPointerType

Definition at line 67 of file otbPathListSource.h.

◆ OutputPathListType

template<class TOutputPath >
typedef Superclass::OutputListType otb::PathListSource< TOutputPath >::OutputPathListType

Definition at line 66 of file otbPathListSource.h.

◆ OutputPathPointerType

template<class TOutputPath >
typedef OutputPathType::Pointer otb::PathListSource< TOutputPath >::OutputPathPointerType

Definition at line 65 of file otbPathListSource.h.

◆ OutputPathType

template<class TOutputPath >
typedef TOutputPath otb::PathListSource< TOutputPath >::OutputPathType

Definition at line 64 of file otbPathListSource.h.

◆ Pointer

template<class TOutputPath >
typedef itk::SmartPointer<Self> otb::PathListSource< TOutputPath >::Pointer

Definition at line 51 of file otbPathListSource.h.

◆ Self

template<class TOutputPath >
typedef PathListSource otb::PathListSource< TOutputPath >::Self

Standard class typedefs.

Definition at line 49 of file otbPathListSource.h.

◆ Superclass

template<class TOutputPath >
typedef ObjectListSource<ObjectList<TOutputPath> > otb::PathListSource< TOutputPath >::Superclass

Definition at line 50 of file otbPathListSource.h.

Constructor & Destructor Documentation

◆ PathListSource() [1/2]

template<class TOutputPath >
otb::PathListSource< TOutputPath >::PathListSource ( )
inlineprotected

Get the output data of this process object. The output of this function is not valid until an appropriate Update() method has been called, either explicitly or implicitly. Both the filter itself and the data object have Update() methods, and both methods update the data. Here are three ways to use GetOutput() and make sure the data is valid. In these examples, image is a pointer to some Image object, and the particular ProcessObjects involved are filters. The same examples apply to non-image (e.g. Mesh) data as well.

anotherFilter->SetInput( someFilter->GetOutput() );
anotherFilter->Update();

In this situation, someFilter and anotherFilter are said to constitute a pipeline.

image = someFilter->GetOutput();
image->Update();
someFilter->Update();
image = someFilter->GetOutput();

(In the above example, the two lines of code can be in either order.)

Note that Update() is not called automatically except within a pipeline as in the first example. When streaming (using a StreamingImageFilter) is activated, it may be more efficient to use a pipeline than to call Update() once for each filter in turn.

For an image, the data generated is for the requested Region, which can be set using ImageBase::SetRequestedRegion(). By default, the largest possible region is requested. Graft the specified DataObject onto this ProcessObject's output. This method grabs a handle to the specified DataObject's path data to use as its output's own path data. It also copies the region ivars (RequestedRegion, BufferedRegion, LargestPossibleRegion) and meta-data (Spacing, Origin) from the specified data object into this filter's output data object. Most importantly, however, it leaves the Source ivar untouched so the original pipeline routing is intact. This method is used when a process object is implemented using a mini-pipeline which is defined in its GenerateData() method. The usage is:

// setup the mini-pipeline to process the input to this filter
firstFilterInMiniPipeline->SetInput( this->GetInput() );
// setup the mini-pipeline to calculate the correct regions
// and write to the appropriate bulk data block
lastFilterInMiniPipeline->GraftOutput( this->GetOutput() );
// execute the mini-pipeline
lastFilterInMiniPipeline->Update();
// graft the mini-pipeline output back onto this filter's output.
// this is needed to get the appropriate regions passed back.
this->GraftOutput( lastFilterInMiniPipeline->GetOutput() );

For proper pipeline execution, a filter using a mini-pipeline must implement the GeneratseInputRequestedRegion(), GenerateOutputRequestedRegion(), GenerateOutputInformation() and EnlargeOutputRequestedRegion() methods as necessary to reflect how the mini-pipeline will execute (in other words, the outer filter's pipeline mechanism must be consistent with what the mini-pipeline will do). Graft the specified data object onto this ProcessObject's idx'th output. This is the similar to GraftOutput method except is allows you specify which output is affected. The specified index must be a valid output number (less than ProcessObject::GetNumberOfOutputs()). See the GraftOutput for general usage information. Make a DataObject of the correct type to used as the specified output. Every ProcessObject subclass must be able to create a DataObject that can be used as a specified output. This method is automatically called when DataObject::DisconnectPipeline() is called. DataObject::DisconnectPipeline, disconnects a data object from being an output of its current source. When the data object is disconnected, the ProcessObject needs to construct a replacement output data object so that the ProcessObject is in a valid state. So DataObject::DisconnectPipeline eventually calls ProcessObject::MakeOutput. Note that MakeOutput always returns a SmartPointer to a DataObject. If a subclass of ImageSource has multiple outputs of different types, then that class must provide an implementation of MakeOutput().

Definition at line 176 of file otbPathListSource.h.

◆ ~PathListSource()

template<class TOutputPath >
otb::PathListSource< TOutputPath >::~PathListSource ( )
inlineoverrideprotected

Get the output data of this process object. The output of this function is not valid until an appropriate Update() method has been called, either explicitly or implicitly. Both the filter itself and the data object have Update() methods, and both methods update the data. Here are three ways to use GetOutput() and make sure the data is valid. In these examples, image is a pointer to some Image object, and the particular ProcessObjects involved are filters. The same examples apply to non-image (e.g. Mesh) data as well.

anotherFilter->SetInput( someFilter->GetOutput() );
anotherFilter->Update();

In this situation, someFilter and anotherFilter are said to constitute a pipeline.

image = someFilter->GetOutput();
image->Update();
someFilter->Update();
image = someFilter->GetOutput();

(In the above example, the two lines of code can be in either order.)

Note that Update() is not called automatically except within a pipeline as in the first example. When streaming (using a StreamingImageFilter) is activated, it may be more efficient to use a pipeline than to call Update() once for each filter in turn.

For an image, the data generated is for the requested Region, which can be set using ImageBase::SetRequestedRegion(). By default, the largest possible region is requested. Graft the specified DataObject onto this ProcessObject's output. This method grabs a handle to the specified DataObject's path data to use as its output's own path data. It also copies the region ivars (RequestedRegion, BufferedRegion, LargestPossibleRegion) and meta-data (Spacing, Origin) from the specified data object into this filter's output data object. Most importantly, however, it leaves the Source ivar untouched so the original pipeline routing is intact. This method is used when a process object is implemented using a mini-pipeline which is defined in its GenerateData() method. The usage is:

// setup the mini-pipeline to process the input to this filter
firstFilterInMiniPipeline->SetInput( this->GetInput() );
// setup the mini-pipeline to calculate the correct regions
// and write to the appropriate bulk data block
lastFilterInMiniPipeline->GraftOutput( this->GetOutput() );
// execute the mini-pipeline
lastFilterInMiniPipeline->Update();
// graft the mini-pipeline output back onto this filter's output.
// this is needed to get the appropriate regions passed back.
this->GraftOutput( lastFilterInMiniPipeline->GetOutput() );

For proper pipeline execution, a filter using a mini-pipeline must implement the GeneratseInputRequestedRegion(), GenerateOutputRequestedRegion(), GenerateOutputInformation() and EnlargeOutputRequestedRegion() methods as necessary to reflect how the mini-pipeline will execute (in other words, the outer filter's pipeline mechanism must be consistent with what the mini-pipeline will do). Graft the specified data object onto this ProcessObject's idx'th output. This is the similar to GraftOutput method except is allows you specify which output is affected. The specified index must be a valid output number (less than ProcessObject::GetNumberOfOutputs()). See the GraftOutput for general usage information. Make a DataObject of the correct type to used as the specified output. Every ProcessObject subclass must be able to create a DataObject that can be used as a specified output. This method is automatically called when DataObject::DisconnectPipeline() is called. DataObject::DisconnectPipeline, disconnects a data object from being an output of its current source. When the data object is disconnected, the ProcessObject needs to construct a replacement output data object so that the ProcessObject is in a valid state. So DataObject::DisconnectPipeline eventually calls ProcessObject::MakeOutput. Note that MakeOutput always returns a SmartPointer to a DataObject. If a subclass of ImageSource has multiple outputs of different types, then that class must provide an implementation of MakeOutput().

Definition at line 177 of file otbPathListSource.h.

◆ PathListSource() [2/2]

template<class TOutputPath >
otb::PathListSource< TOutputPath >::PathListSource ( const Self )
privatedelete

Get the output data of this process object. The output of this function is not valid until an appropriate Update() method has been called, either explicitly or implicitly. Both the filter itself and the data object have Update() methods, and both methods update the data. Here are three ways to use GetOutput() and make sure the data is valid. In these examples, image is a pointer to some Image object, and the particular ProcessObjects involved are filters. The same examples apply to non-image (e.g. Mesh) data as well.

anotherFilter->SetInput( someFilter->GetOutput() );
anotherFilter->Update();

In this situation, someFilter and anotherFilter are said to constitute a pipeline.

image = someFilter->GetOutput();
image->Update();
someFilter->Update();
image = someFilter->GetOutput();

(In the above example, the two lines of code can be in either order.)

Note that Update() is not called automatically except within a pipeline as in the first example. When streaming (using a StreamingImageFilter) is activated, it may be more efficient to use a pipeline than to call Update() once for each filter in turn.

For an image, the data generated is for the requested Region, which can be set using ImageBase::SetRequestedRegion(). By default, the largest possible region is requested. Graft the specified DataObject onto this ProcessObject's output. This method grabs a handle to the specified DataObject's path data to use as its output's own path data. It also copies the region ivars (RequestedRegion, BufferedRegion, LargestPossibleRegion) and meta-data (Spacing, Origin) from the specified data object into this filter's output data object. Most importantly, however, it leaves the Source ivar untouched so the original pipeline routing is intact. This method is used when a process object is implemented using a mini-pipeline which is defined in its GenerateData() method. The usage is:

// setup the mini-pipeline to process the input to this filter
firstFilterInMiniPipeline->SetInput( this->GetInput() );
// setup the mini-pipeline to calculate the correct regions
// and write to the appropriate bulk data block
lastFilterInMiniPipeline->GraftOutput( this->GetOutput() );
// execute the mini-pipeline
lastFilterInMiniPipeline->Update();
// graft the mini-pipeline output back onto this filter's output.
// this is needed to get the appropriate regions passed back.
this->GraftOutput( lastFilterInMiniPipeline->GetOutput() );

For proper pipeline execution, a filter using a mini-pipeline must implement the GeneratseInputRequestedRegion(), GenerateOutputRequestedRegion(), GenerateOutputInformation() and EnlargeOutputRequestedRegion() methods as necessary to reflect how the mini-pipeline will execute (in other words, the outer filter's pipeline mechanism must be consistent with what the mini-pipeline will do). Graft the specified data object onto this ProcessObject's idx'th output. This is the similar to GraftOutput method except is allows you specify which output is affected. The specified index must be a valid output number (less than ProcessObject::GetNumberOfOutputs()). See the GraftOutput for general usage information. Make a DataObject of the correct type to used as the specified output. Every ProcessObject subclass must be able to create a DataObject that can be used as a specified output. This method is automatically called when DataObject::DisconnectPipeline() is called. DataObject::DisconnectPipeline, disconnects a data object from being an output of its current source. When the data object is disconnected, the ProcessObject needs to construct a replacement output data object so that the ProcessObject is in a valid state. So DataObject::DisconnectPipeline eventually calls ProcessObject::MakeOutput. Note that MakeOutput always returns a SmartPointer to a DataObject. If a subclass of ImageSource has multiple outputs of different types, then that class must provide an implementation of MakeOutput().

Member Function Documentation

◆ CreateAnother()

template<class TOutputPath >
virtual::itk::LightObject::Pointer otb::PathListSource< TOutputPath >::CreateAnother ( void  ) const

◆ GetNameOfClass()

template<class TOutputPath >
virtual const char* otb::PathListSource< TOutputPath >::GetNameOfClass ( ) const
virtual

◆ New()

template<class TOutputPath >
static Pointer otb::PathListSource< TOutputPath >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<class TOutputPath >
void otb::PathListSource< TOutputPath >::operator= ( const Self )
privatedelete

Get the output data of this process object. The output of this function is not valid until an appropriate Update() method has been called, either explicitly or implicitly. Both the filter itself and the data object have Update() methods, and both methods update the data. Here are three ways to use GetOutput() and make sure the data is valid. In these examples, image is a pointer to some Image object, and the particular ProcessObjects involved are filters. The same examples apply to non-image (e.g. Mesh) data as well.

anotherFilter->SetInput( someFilter->GetOutput() );
anotherFilter->Update();

In this situation, someFilter and anotherFilter are said to constitute a pipeline.

image = someFilter->GetOutput();
image->Update();
someFilter->Update();
image = someFilter->GetOutput();

(In the above example, the two lines of code can be in either order.)

Note that Update() is not called automatically except within a pipeline as in the first example. When streaming (using a StreamingImageFilter) is activated, it may be more efficient to use a pipeline than to call Update() once for each filter in turn.

For an image, the data generated is for the requested Region, which can be set using ImageBase::SetRequestedRegion(). By default, the largest possible region is requested. Graft the specified DataObject onto this ProcessObject's output. This method grabs a handle to the specified DataObject's path data to use as its output's own path data. It also copies the region ivars (RequestedRegion, BufferedRegion, LargestPossibleRegion) and meta-data (Spacing, Origin) from the specified data object into this filter's output data object. Most importantly, however, it leaves the Source ivar untouched so the original pipeline routing is intact. This method is used when a process object is implemented using a mini-pipeline which is defined in its GenerateData() method. The usage is:

// setup the mini-pipeline to process the input to this filter
firstFilterInMiniPipeline->SetInput( this->GetInput() );
// setup the mini-pipeline to calculate the correct regions
// and write to the appropriate bulk data block
lastFilterInMiniPipeline->GraftOutput( this->GetOutput() );
// execute the mini-pipeline
lastFilterInMiniPipeline->Update();
// graft the mini-pipeline output back onto this filter's output.
// this is needed to get the appropriate regions passed back.
this->GraftOutput( lastFilterInMiniPipeline->GetOutput() );

For proper pipeline execution, a filter using a mini-pipeline must implement the GeneratseInputRequestedRegion(), GenerateOutputRequestedRegion(), GenerateOutputInformation() and EnlargeOutputRequestedRegion() methods as necessary to reflect how the mini-pipeline will execute (in other words, the outer filter's pipeline mechanism must be consistent with what the mini-pipeline will do). Graft the specified data object onto this ProcessObject's idx'th output. This is the similar to GraftOutput method except is allows you specify which output is affected. The specified index must be a valid output number (less than ProcessObject::GetNumberOfOutputs()). See the GraftOutput for general usage information. Make a DataObject of the correct type to used as the specified output. Every ProcessObject subclass must be able to create a DataObject that can be used as a specified output. This method is automatically called when DataObject::DisconnectPipeline() is called. DataObject::DisconnectPipeline, disconnects a data object from being an output of its current source. When the data object is disconnected, the ProcessObject needs to construct a replacement output data object so that the ProcessObject is in a valid state. So DataObject::DisconnectPipeline eventually calls ProcessObject::MakeOutput. Note that MakeOutput always returns a SmartPointer to a DataObject. If a subclass of ImageSource has multiple outputs of different types, then that class must provide an implementation of MakeOutput().


The documentation for this class was generated from the following file:
otb::ObjectListSource< ObjectList< TOutputPath > >::GetOutput
OutputListType * GetOutput(void)
Definition: otbObjectListSource.hxx:58
otb::ObjectListSource< ObjectList< TOutputPath > >::GraftOutput
void GraftOutput(itk::DataObject *graft)
Definition: otbObjectListSource.hxx:81