ITK  4.8.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Private Member Functions | List of all members
itk::ImageTransformer< TInputImage > Class Template Reference

#include <itkImageTransformer.h>

+ Inheritance diagram for itk::ImageTransformer< TInputImage >:
+ Collaboration diagram for itk::ImageTransformer< TInputImage >:

Detailed Description

template<typename TInputImage>
class itk::ImageTransformer< TInputImage >

Base class for all process objects that transform an image into something else.

ImageTransformer is the base class for all process objects that transform an image data. Specifically, this class defines the SetInput() method that takes a pointer to the input image. The class also defines some internal private data members that are used to manage streaming of data.

Memory management in an ImageTransformer is slightly different than a standard ProcessObject. ProcessObject's always release the bulk data associated with their output prior to GenerateData() being called. ImageTransformers default to not releasing the bulk data incase that particular memory block is large enough to hold the new output values. This avoids unnecessary deallocation/allocation sequences. ImageTransformer's can be forced to use a memory management model similar to the default ProcessObject behaviour by calling ProcessObject::ReleaseDataBeforeUpdateFlagOn(). A user may want to set this flag to limit peak memory usage during a pipeline update.

Definition at line 59 of file itkImageTransformer.h.

Classes

struct  ThreadStruct
 

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef DataObject::Pointer DataObjectPointer
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef SmartPointer< SelfPointer
 
typedef ImageTransformer Self
 
typedef ProcessObject Superclass
 
- Public Types inherited from itk::ProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef
DataObject::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef std::vector
< DataObjectPointer
DataObjectPointerArray
 
typedef
DataObjectPointerArray::size_type 
DataObjectPointerArraySizeType
 
typedef std::vector
< DataObjectIdentifierType
NameArray
 
typedef SmartPointer< SelfPointer
 
typedef ProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual const char * GetNameOfClass () const
 
virtual void SetInput (const InputImageType *image)
 
virtual void SetInput (unsigned int, const TInputImage *image)
 
const InputImageTypeGetInput () const
 
InputImageTypeGetInput ()
 
const InputImageTypeGetInput (unsigned int idx) const
 
virtual void PushBackInput (const InputImageType *image)
 
virtual void PopBackInput () override
 
virtual void PushFrontInput (const InputImageType *image)
 
virtual void PopFrontInput () override
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
MultiThreader * GetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual const float & GetProgress () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx)
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
virtual void PrepareOutputs ()
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void Update ()
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
virtual void UpdateOutputInformation ()
 
void UpdateProgress (float progress)
 
void SetProgress (float progress)
 
virtual void SetReleaseDataFlag (bool flag)
 
virtual bool GetReleaseDataFlag () const
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void SetNumberOfThreads (ThreadIdType _arg)
 
virtual const ThreadIdTypeGetNumberOfThreads () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
virtual void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) override
 
virtual void UnRegister () const noexceptoverride
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
void Print (std::ostream &os, Indent indent=0) const
 

Static Public Attributes

static const unsigned int InputImageDimension = TInputImage::ImageDimension
 

Protected Member Functions

virtual void AfterThreadedGenerateData ()
 
virtual void AllocateOutputs ()
 
virtual void BeforeThreadedGenerateData ()
 
virtual void GenerateData () override
 
virtual void GenerateInputRequestedRegion () override
 
 ImageTransformer ()
 
virtual unsigned int SplitRequestedRegion (unsigned int i, unsigned int num, InputImageRegionType &splitRegion)
 
virtual void ThreadedGenerateData (const InputImageRegionType &inputRegionForThread, ThreadIdType threadId)
 
virtual ~ImageTransformer ()
 
virtual void PushBackInput (const DataObject *input) override
 
virtual void PushFrontInput (const DataObject *input) override
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
virtual void AddOutput (DataObject *output)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateOutputInformation ()
 
virtual void GenerateOutputRequestedRegion (DataObject *output)
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredInputs () const
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs () const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
 itkLegacyMacro (virtual void RemoveOutput(DataObject *output))
 
 itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num))
 
 itkLegacyMacro (virtual void RemoveInput(DataObject *input))
 
 itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num))
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
virtual void PrintSelf (std::ostream &os, Indent indent) const override
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *input)
 
virtual void SetPrimaryOutput (DataObject *output)
 
void SetRequiredInputNames (const NameArray &)
 
virtual void VerifyInputInformation ()
 
virtual void VerifyPreconditions ()
 
 ~ProcessObject ()
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryInputName (void) const
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryOutputName (void) const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Static Protected Member Functions

static ITK_THREAD_RETURN_TYPE ThreaderCallback (void *arg)
 

Private Member Functions

 ImageTransformer (const Self &)
 
void operator= (const Self &)
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool flag)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 
- Protected Attributes inherited from itk::LightObject
AtomicInt< int > m_ReferenceCount
 

Member Typedef Documentation

template<typename TInputImage>
typedef SmartPointer< const Self > itk::ImageTransformer< TInputImage >::ConstPointer

Definition at line 66 of file itkImageTransformer.h.

template<typename TInputImage>
typedef DataObject::Pointer itk::ImageTransformer< TInputImage >::DataObjectPointer

Smart Pointer type to a DataObject.

Definition at line 69 of file itkImageTransformer.h.

template<typename TInputImage>
typedef InputImageType::PixelType itk::ImageTransformer< TInputImage >::InputImagePixelType

Definition at line 78 of file itkImageTransformer.h.

template<typename TInputImage>
typedef InputImageType::Pointer itk::ImageTransformer< TInputImage >::InputImagePointer

Definition at line 76 of file itkImageTransformer.h.

template<typename TInputImage>
typedef InputImageType::RegionType itk::ImageTransformer< TInputImage >::InputImageRegionType

Definition at line 77 of file itkImageTransformer.h.

template<typename TInputImage>
typedef TInputImage itk::ImageTransformer< TInputImage >::InputImageType

Some convenient typedefs.

Definition at line 72 of file itkImageTransformer.h.

template<typename TInputImage>
typedef SmartPointer< Self > itk::ImageTransformer< TInputImage >::Pointer

Definition at line 65 of file itkImageTransformer.h.

template<typename TInputImage>
typedef ImageTransformer itk::ImageTransformer< TInputImage >::Self

Standard class typedefs.

Definition at line 63 of file itkImageTransformer.h.

template<typename TInputImage>
typedef ProcessObject itk::ImageTransformer< TInputImage >::Superclass

Definition at line 64 of file itkImageTransformer.h.

Constructor & Destructor Documentation

template<typename TInputImage>
itk::ImageTransformer< TInputImage >::ImageTransformer ( )
protected
template<typename TInputImage>
virtual itk::ImageTransformer< TInputImage >::~ImageTransformer ( )
inlineprotectedvirtual

Definition at line 120 of file itkImageTransformer.h.

template<typename TInputImage>
itk::ImageTransformer< TInputImage >::ImageTransformer ( const Self )
private

Member Function Documentation

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::AfterThreadedGenerateData ( )
inlineprotectedvirtual

If an imaging filter needs to perform processing after all processing threads have completed, the filter can can provide an implementation for AfterThreadedGenerateData(). The execution flow in the default GenerateData() method will be: 1) Allocate the output buffer 2) Call BeforeThreadedGenerateData() 3) Spawn threads, calling ThreadedGenerateData() in each thread. 4) Call AfterThreadedGenerateData() Note that this flow of control is only available if a filter provides a ThreadedGenerateData() method and NOT a GenerateData() method.

Reimplemented in itk::Statistics::ImageToHistogramFilter< TImage >.

Definition at line 209 of file itkImageTransformer.h.

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::AllocateOutputs ( )
protectedvirtual

The GenerateData method normally allocates the buffers for all of the outputs of a filter. Some filters may want to override this default behavior. For example, a filter may have multiple outputs with varying resolution. Or a filter may want to process data in place by grafting its input to its output.

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::BeforeThreadedGenerateData ( void  )
inlineprotectedvirtual

If an imaging filter needs to perform processing after the buffer has been allocated but before threads are spawned, the filter can can provide an implementation for BeforeThreadedGenerateData(). The execution flow in the default GenerateData() method will be: 1) Allocate the output buffer 2) Call BeforeThreadedGenerateData() 3) Spawn threads, calling ThreadedGenerateData() in each thread. 4) Call AfterThreadedGenerateData() Note that this flow of control is only available if a filter provides a ThreadedGenerateData() method and NOT a GenerateData() method.

Reimplemented in itk::Statistics::ImageToHistogramFilter< TImage >.

Definition at line 197 of file itkImageTransformer.h.

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::GenerateData ( )
overrideprotectedvirtual

A version of GenerateData() specific for image processing filters. This implementation will split the processing across multiple threads. The buffer is allocated by this method. Then the BeforeThreadedGenerateData() method is called (if provided). Then, a series of threads are spawned each calling ThreadedGenerateData(). After all the threads have completed processing, the AfterThreadedGenerateData() method is called (if provided). If an image processing filter cannot be threaded, the filter should provide an implementation of GenerateData(). That implementation is responsible for allocating the output buffer. If a filter an be threaded, it should NOT provide a GenerateData() method but should provide a ThreadedGenerateData() instead.

See Also
ThreadedGenerateData()

Reimplemented from itk::ProcessObject.

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::GenerateInputRequestedRegion ( )
overrideprotectedvirtual

The image transformer is assumed to need the whole input.

This implementation of GenerateInputRequestedRegion() only processes the inputs that are a subclass of the ImageBase<InputImageDimension>. If an input is another type of DataObject (including an Image of a different dimension), they are skipped by this method. The subclasses of ImageToImageFilter are responsible for providing an implementation of GenerateInputRequestedRegion() when there are multiple inputs of different types.

See Also
ProcessObject::GenerateInputRequestedRegion(), ImageSource::GenerateInputRequestedRegion()

Reimplemented from itk::ProcessObject.

template<typename TInputImage>
const InputImageType* itk::ImageTransformer< TInputImage >::GetInput ( ) const
template<typename TInputImage>
InputImageType* itk::ImageTransformer< TInputImage >::GetInput ( )
template<typename TInputImage>
const InputImageType* itk::ImageTransformer< TInputImage >::GetInput ( unsigned int  idx) const
template<typename TInputImage>
virtual const char* itk::ImageTransformer< TInputImage >::GetNameOfClass ( ) const
virtual

Run-time type information (and related methods).

Reimplemented from itk::ProcessObject.

Reimplemented in itk::Statistics::ImageToHistogramFilter< TImage >, and itk::Statistics::MaskedImageToHistogramFilter< TImage, TMaskImage >.

template<typename TInputImage>
void itk::ImageTransformer< TInputImage >::operator= ( const Self )
private
template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::PopBackInput ( )
overridevirtual

Push/Pop the input of this process object. These methods allow a filter to model its input vector as a queue or stack. These routines may not be appropriate for all filters, especially filters with different types of inputs. These routines follow the semantics of STL.

The routines are useful for applications that need to process "rolling" sets of images. For instance, if an application has 10 images and they need to run a filter on images 1, 2, 3, 4, then run the filter on images 2, 3, 4, 5, then run the filter on images 3, 4, 5, 6, the application can accomplish this by popping an input off the front of the input list and push a new image onto the back of input list. Again, this only makes sense for filters that single type of input.

Other uses are also possible. For a single input filter, pushing and popping inputs allow the application to temporarily replace an input to a filter.

Reimplemented from itk::ProcessObject.

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::PopFrontInput ( )
overridevirtual

Push/Pop the input of this process object. These methods allow a filter to model its input vector as a queue or stack. These routines may not be appropriate for all filters, especially filters with different types of inputs. These routines follow the semantics of STL.

The routines are useful for applications that need to process "rolling" sets of images. For instance, if an application has 10 images and they need to run a filter on images 1, 2, 3, 4, then run the filter on images 2, 3, 4, 5, then run the filter on images 3, 4, 5, 6, the application can accomplish this by popping an input off the front of the input list and push a new image onto the back of input list. Again, this only makes sense for filters that single type of input.

Other uses are also possible. For a single input filter, pushing and popping inputs allow the application to temporarily replace an input to a filter.

Reimplemented from itk::ProcessObject.

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::PushBackInput ( const InputImageType image)
virtual

Push/Pop the input of this process object. These methods allow a filter to model its input vector as a queue or stack. These routines may not be appropriate for all filters, especially filters with different types of inputs. These routines follow the semantics of STL.

The routines are useful for applications that need to process "rolling" sets of images. For instance, if an application has 10 images and they need to run a filter on images 1, 2, 3, 4, then run the filter on images 2, 3, 4, 5, then run the filter on images 3, 4, 5, 6, the application can accomplish this by popping an input off the front of the input list and push a new image onto the back of input list. Again, this only makes sense for filters that single type of input.

Other uses are also possible. For a single input filter, pushing and popping inputs allow the application to temporarily replace an input to a filter.

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::PushBackInput ( const DataObject input)
inlineoverrideprotectedvirtual

PushBackInput(), PushFrontInput() in the public section force the input to be the type expected by an ImageTransformer. However, these methods end up "hiding" the versions from the superclass (ProcessObject) whose arguments are DataObjects. Here, we re-expose the versions from ProcessObject to avoid warnings about hiding methods from the superclass. NOTE: The same code resides in ImageToImageFilter

Reimplemented from itk::ProcessObject.

Definition at line 233 of file itkImageTransformer.h.

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::PushFrontInput ( const InputImageType image)
virtual

Push/Pop the input of this process object. These methods allow a filter to model its input vector as a queue or stack. These routines may not be appropriate for all filters, especially filters with different types of inputs. These routines follow the semantics of STL.

The routines are useful for applications that need to process "rolling" sets of images. For instance, if an application has 10 images and they need to run a filter on images 1, 2, 3, 4, then run the filter on images 2, 3, 4, 5, then run the filter on images 3, 4, 5, 6, the application can accomplish this by popping an input off the front of the input list and push a new image onto the back of input list. Again, this only makes sense for filters that single type of input.

Other uses are also possible. For a single input filter, pushing and popping inputs allow the application to temporarily replace an input to a filter.

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::PushFrontInput ( const DataObject input)
inlineoverrideprotectedvirtual

PushBackInput(), PushFrontInput() in the public section force the input to be the type expected by an ImageTransformer. However, these methods end up "hiding" the versions from the superclass (ProcessObject) whose arguments are DataObjects. Here, we re-expose the versions from ProcessObject to avoid warnings about hiding methods from the superclass. NOTE: The same code resides in ImageToImageFilter

Reimplemented from itk::ProcessObject.

Definition at line 235 of file itkImageTransformer.h.

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::SetInput ( const InputImageType image)
virtual
template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::SetInput ( unsigned  int,
const TInputImage *  image 
)
virtual
template<typename TInputImage>
virtual unsigned int itk::ImageTransformer< TInputImage >::SplitRequestedRegion ( unsigned int  i,
unsigned int  num,
InputImageRegionType splitRegion 
)
protectedvirtual

Split the input's RequestedRegion into "num" pieces, returning region "i" as "splitRegion". This method is called "num" times. The regions must not overlap. The method returns the number of pieces that the routine is capable of splitting the input RequestedRegion, i.e. return value is less than or equal to "num".

template<typename TInputImage>
virtual void itk::ImageTransformer< TInputImage >::ThreadedGenerateData ( const InputImageRegionType inputRegionForThread,
ThreadIdType  threadId 
)
protectedvirtual

If an imaging filter can be implemented as a multithreaded algorithm, the filter will provide an implementation of ThreadedGenerateData(). This superclass will automatically split the output image into a number of pieces, spawn multiple threads, and call ThreadedGenerateData() in each thread. Prior to spawning threads, the BeforeThreadedGenerateData() method is called. After all the threads have completed, the AfterThreadedGenerateData() method is called. If an image processing filter cannot support threading, that filter should provide an implementation of the GenerateData() method instead of providing an implementation of ThreadedGenerateData(). If a filter provides a GenerateData() method as its implementation, then the filter is responsible for allocating the output data. If a filter provides a ThreadedGenerateData() method as its implementation, then the output memory will allocated automatically by this superclass. The ThreadedGenerateData() method should only produce the output specified by "inputThreadRegion" parameter. ThreadedGenerateData() cannot write to any other portion of the output image (as this is responsibility of a different thread).

See Also
GenerateData(), SplitRequestedRegion()
template<typename TInputImage>
static ITK_THREAD_RETURN_TYPE itk::ImageTransformer< TInputImage >::ThreaderCallback ( void *  arg)
staticprotected

Static function used as a "callback" by the MultiThreader. The threading library will call this routine for each thread, which will delegate the control to ThreadedGenerateData().

Member Data Documentation

template<typename TInputImage>
const unsigned int itk::ImageTransformer< TInputImage >::InputImageDimension = TInputImage::ImageDimension
static

ImageDimension constant

Definition at line 82 of file itkImageTransformer.h.


The documentation for this class was generated from the following file: