go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
itk::ImageSamplerBase< TInputImage > Class Template Reference

#include <itkImageSamplerBase.h>

Detailed Description

template<class TInputImage>
class itk::ImageSamplerBase< TInputImage >

This class is a base class for any image sampler.

Parameters:
ImageSampler: The way samples are taken from the fixed image in order to compute the metric value and its derivative in each iteration. Can be given for each resolution. Select one of {Random, Full, Grid, RandomCoordinate}.
example: (ImageSampler "Random")
The default is Random.

Definition at line 42 of file itkImageSamplerBase.h.

Inheritance diagram for itk::ImageSamplerBase< TInputImage >:
Inheritance graph
[legend]

Public Types

using ConstPointer = SmartPointer< const Self >
 
using ImageSampleContainerPointer = typename ImageSampleContainerType::Pointer
 
using ImageSampleContainerType = VectorDataContainer< std::vcl_size_t, ImageSampleType >
 
using ImageSampleType = ImageSample< InputImageType >
 
using ImageSampleValueType = typename ImageSampleType::RealType
 
using InputImageIndexType = typename InputImageType::IndexType
 
using InputImagePointType = typename InputImageType::PointType
 
using InputImagePointValueType = typename InputImagePointType::ValueType
 
using InputImageRegionVectorType = std::vector< InputImageRegionType >
 
using InputImageSizeType = typename InputImageType::SizeType
 
using MaskConstPointer = typename MaskType::ConstPointer
 
using MaskPointer = typename MaskType::Pointer
 
using MaskType = SpatialObject< Self::InputImageDimension >
 
using MaskVectorType = std::vector< MaskConstPointer >
 
using Pointer = SmartPointer< Self >
 
using Self = ImageSamplerBase
 
using Superclass = ImageToVectorContainerFilter< TInputImage, VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >
 
- Public Types inherited from itk::ImageToVectorContainerFilter< TInputImage, VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >
using ConstPointer = SmartPointer< const Self >
 
using InputImageConstPointer = typename InputImageType::ConstPointer
 
using InputImagePixelType = typename InputImageType::PixelType
 
using InputImagePointer = typename InputImageType::Pointer
 
using InputImageRegionType = typename InputImageType::RegionType
 
using InputImageType = TInputImage
 
using OutputVectorContainerPointer = typename OutputVectorContainerType::Pointer
 
using OutputVectorContainerType = VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > >
 
using Pointer = SmartPointer< Self >
 
using Self = ImageToVectorContainerFilter
 
using Superclass = VectorContainerSource< VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >
 
- Public Types inherited from itk::VectorContainerSource< TOutputVectorContainer >
using ConstPointer = SmartPointer< const Self >
 
using OutputVectorContainerPointer = typename OutputVectorContainerType::Pointer
 
using OutputVectorContainerType = TOutputVectorContainer
 
using Pointer = SmartPointer< Self >
 
using Self = VectorContainerSource
 
using Superclass = ProcessObject
 

Public Member Functions

virtual const char * GetClassName () const
 
virtual const InputImageRegionTypeGetCroppedInputImageRegion ()
 
virtual const InputImageRegionTypeGetInputImageRegion () const
 
virtual const InputImageRegionTypeGetInputImageRegion (unsigned int pos) const
 
virtual const MaskTypeGetMask () const
 
virtual const MaskTypeGetMask (unsigned int pos) const
 
virtual unsigned int GetNumberOfInputImageRegions () const
 
virtual unsigned int GetNumberOfMasks () const
 
virtual unsigned long GetNumberOfSamples () const
 
 ITK_DISALLOW_COPY_AND_MOVE (ImageSamplerBase)
 
 itkStaticConstMacro (InputImageDimension, unsigned int, InputImageType::ImageDimension)
 
virtual bool SelectingNewSamplesOnUpdateSupported () const
 
virtual bool SelectNewSamplesOnUpdate ()
 
virtual void SetInputImageRegion (const InputImageRegionType _arg)
 
virtual void SetInputImageRegion (const InputImageRegionType _arg, unsigned int pos)
 
virtual void SetMask (const MaskType *_arg)
 
virtual void SetMask (const MaskType *_arg, unsigned int pos)
 
virtual void SetNumberOfInputImageRegions (const unsigned int _arg)
 
virtual void SetNumberOfMasks (const unsigned int _arg)
 
virtual void SetNumberOfSamples (unsigned long _arg)
 
virtual void SetUseMultiThread (bool _arg)
 
- Public Member Functions inherited from itk::ImageToVectorContainerFilter< TInputImage, VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >
virtual void AfterThreadedGenerateData ()
 
virtual void BeforeThreadedGenerateData ()
 
void GenerateData () override
 
virtual const char * GetClassName () const
 
const InputImageTypeGetInput ()
 
const InputImageTypeGetInput (unsigned int idx)
 
OutputVectorContainerTypeGetOutput ()
 
 ITK_DISALLOW_COPY_AND_MOVE (ImageToVectorContainerFilter)
 
DataObject::Pointer MakeOutput (unsigned int idx) override
 
void SetInput (const InputImageType *input)
 
void SetInput (unsigned int idx, const InputImageType *input)
 
virtual unsigned int SplitRequestedRegion (const ThreadIdType &threadId, const ThreadIdType &numberOfSplits, InputImageRegionType &splitRegion)
 
virtual void ThreadedGenerateData (const InputImageRegionType &inputRegionForThread, ThreadIdType threadId)
 
- Public Member Functions inherited from itk::VectorContainerSource< TOutputVectorContainer >
virtual const char * GetClassName () const
 
OutputVectorContainerTypeGetOutput ()
 
OutputVectorContainerTypeGetOutput (unsigned int idx)
 
virtual void GraftNthOutput (unsigned int idx, DataObject *output)
 
virtual void GraftOutput (DataObject *output)
 
 ITK_DISALLOW_COPY_AND_MOVE (VectorContainerSource)
 
virtual DataObjectPointer MakeOutput (unsigned int idx)
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::ImageToVectorContainerFilter< TInputImage, VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >
static Pointer New ()
 
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ThreaderCallback (void *arg)
 
- Static Public Member Functions inherited from itk::VectorContainerSource< TOutputVectorContainer >
static Pointer New ()
 

Protected Member Functions

void AfterThreadedGenerateData () override
 
void BeforeThreadedGenerateData () override
 
virtual bool CheckInputImageRegions ()
 
void CropInputImageRegion ()
 
void GenerateInputRequestedRegion () override
 
 ImageSamplerBase ()=default
 
virtual bool IsInsideAllMasks (const InputImagePointType &point) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
virtual void UpdateAllMasks ()
 
 ~ImageSamplerBase () override=default
 
- Protected Member Functions inherited from itk::ImageToVectorContainerFilter< TInputImage, VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >
 ImageToVectorContainerFilter ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~ImageToVectorContainerFilter () override=default
 
- Protected Member Functions inherited from itk::VectorContainerSource< TOutputVectorContainer >
void PrintSelf (std::ostream &os, Indent indent) const override
 
 VectorContainerSource ()
 
 ~VectorContainerSource () override=default
 

Protected Attributes

unsigned long m_NumberOfSamples { 0 }
 
std::vector< ImageSampleContainerPointerm_ThreaderSampleContainer
 
bool m_UseMultiThread { false }
 

Private Attributes

InputImageRegionType m_CroppedInputImageRegion
 
InputImageRegionType m_DummyInputImageRegion
 
InputImageRegionType m_InputImageRegion
 
InputImageRegionVectorType m_InputImageRegionVector
 
MaskConstPointer m_Mask { nullptr }
 
MaskVectorType m_MaskVector
 
unsigned int m_NumberOfInputImageRegions { 0 }
 
unsigned int m_NumberOfMasks { 0 }
 

Member Typedef Documentation

◆ ConstPointer

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::ConstPointer = SmartPointer<const Self>

Definition at line 53 of file itkImageSamplerBase.h.

◆ ImageSampleContainerPointer

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::ImageSampleContainerPointer = typename ImageSampleContainerType::Pointer

Definition at line 77 of file itkImageSamplerBase.h.

◆ ImageSampleContainerType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::ImageSampleContainerType = VectorDataContainer<std::vcl_size_t, ImageSampleType>

Definition at line 76 of file itkImageSamplerBase.h.

◆ ImageSampleType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::ImageSampleType = ImageSample<InputImageType>

Other typdefs.

Definition at line 75 of file itkImageSamplerBase.h.

◆ ImageSampleValueType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::ImageSampleValueType = typename ImageSampleType::RealType

Definition at line 82 of file itkImageSamplerBase.h.

◆ InputImageIndexType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::InputImageIndexType = typename InputImageType::IndexType

Definition at line 79 of file itkImageSamplerBase.h.

◆ InputImagePointType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::InputImagePointType = typename InputImageType::PointType

Definition at line 80 of file itkImageSamplerBase.h.

◆ InputImagePointValueType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::InputImagePointValueType = typename InputImagePointType::ValueType

Definition at line 81 of file itkImageSamplerBase.h.

◆ InputImageRegionVectorType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::InputImageRegionVectorType = std::vector<InputImageRegionType>

Definition at line 87 of file itkImageSamplerBase.h.

◆ InputImageSizeType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::InputImageSizeType = typename InputImageType::SizeType

Definition at line 78 of file itkImageSamplerBase.h.

◆ MaskConstPointer

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::MaskConstPointer = typename MaskType::ConstPointer

Definition at line 85 of file itkImageSamplerBase.h.

◆ MaskPointer

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::MaskPointer = typename MaskType::Pointer

Definition at line 84 of file itkImageSamplerBase.h.

◆ MaskType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::MaskType = SpatialObject<Self::InputImageDimension>

Definition at line 83 of file itkImageSamplerBase.h.

◆ MaskVectorType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::MaskVectorType = std::vector<MaskConstPointer>

Definition at line 86 of file itkImageSamplerBase.h.

◆ Pointer

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::Pointer = SmartPointer<Self>

Definition at line 52 of file itkImageSamplerBase.h.

◆ Self

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::Self = ImageSamplerBase

Standard ITK-stuff.

Definition at line 49 of file itkImageSamplerBase.h.

◆ Superclass

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::Superclass = ImageToVectorContainerFilter<TInputImage, VectorDataContainer<std::vcl_size_t, ImageSample<TInputImage> >>

Definition at line 50 of file itkImageSamplerBase.h.

Constructor & Destructor Documentation

◆ ImageSamplerBase()

template<class TInputImage >
itk::ImageSamplerBase< TInputImage >::ImageSamplerBase ( )
protecteddefault

The constructor.

◆ ~ImageSamplerBase()

template<class TInputImage >
itk::ImageSamplerBase< TInputImage >::~ImageSamplerBase ( )
overrideprotecteddefault

The destructor.

Member Function Documentation

◆ AfterThreadedGenerateData()

template<class TInputImage >
void itk::ImageSamplerBase< TInputImage >::AfterThreadedGenerateData ( )
overrideprotectedvirtual

◆ BeforeThreadedGenerateData()

template<class TInputImage >
void itk::ImageSamplerBase< TInputImage >::BeforeThreadedGenerateData ( )
overrideprotectedvirtual

◆ CheckInputImageRegions()

template<class TInputImage >
virtual bool itk::ImageSamplerBase< TInputImage >::CheckInputImageRegions ( )
protectedvirtual

Checks if the InputImageRegions are a subregion of the LargestPossibleRegions.

◆ CropInputImageRegion()

template<class TInputImage >
void itk::ImageSamplerBase< TInputImage >::CropInputImageRegion ( )
protected

Compute the intersection of the InputImageRegion and the bounding box of the mask.

◆ GenerateInputRequestedRegion()

template<class TInputImage >
void itk::ImageSamplerBase< TInputImage >::GenerateInputRequestedRegion ( )
overrideprotected

GenerateInputRequestedRegion.

◆ GetClassName()

template<class TInputImage >
virtual const char * itk::ImageSamplerBase< TInputImage >::GetClassName ( ) const
virtual

◆ GetCroppedInputImageRegion()

template<class TInputImage >
virtual const InputImageRegionType & itk::ImageSamplerBase< TInputImage >::GetCroppedInputImageRegion ( )
virtual

Get a handle to the cropped InputImageregion.

◆ GetInputImageRegion() [1/2]

template<class TInputImage >
virtual const InputImageRegionType & itk::ImageSamplerBase< TInputImage >::GetInputImageRegion ( ) const
inlinevirtual

Get the first input image region.

Definition at line 144 of file itkImageSamplerBase.h.

◆ GetInputImageRegion() [2/2]

template<class TInputImage >
virtual const InputImageRegionType & itk::ImageSamplerBase< TInputImage >::GetInputImageRegion ( unsigned int  pos) const
virtual

Get the input image regions.

◆ GetMask() [1/2]

template<class TInputImage >
virtual const MaskType * itk::ImageSamplerBase< TInputImage >::GetMask ( ) const
inlinevirtual

Get the first mask.

Definition at line 111 of file itkImageSamplerBase.h.

◆ GetMask() [2/2]

template<class TInputImage >
virtual const MaskType * itk::ImageSamplerBase< TInputImage >::GetMask ( unsigned int  pos) const
virtual

Get the masks.

◆ GetNumberOfInputImageRegions()

template<class TInputImage >
virtual unsigned int itk::ImageSamplerBase< TInputImage >::GetNumberOfInputImageRegions ( ) const
virtual

Get the number of input image regions.

◆ GetNumberOfMasks()

template<class TInputImage >
virtual unsigned int itk::ImageSamplerBase< TInputImage >::GetNumberOfMasks ( ) const
virtual

Get the number of masks.

◆ GetNumberOfSamples()

template<class TInputImage >
virtual unsigned long itk::ImageSamplerBase< TInputImage >::GetNumberOfSamples ( ) const
virtual

◆ IsInsideAllMasks()

template<class TInputImage >
virtual bool itk::ImageSamplerBase< TInputImage >::IsInsideAllMasks ( const InputImagePointType point) const
protectedvirtual

IsInsideAllMasks.

◆ ITK_DISALLOW_COPY_AND_MOVE()

template<class TInputImage >
itk::ImageSamplerBase< TInputImage >::ITK_DISALLOW_COPY_AND_MOVE ( ImageSamplerBase< TInputImage >  )

◆ itkStaticConstMacro()

template<class TInputImage >
itk::ImageSamplerBase< TInputImage >::itkStaticConstMacro ( InputImageDimension  ,
unsigned int  ,
InputImageType::ImageDimension   
)

The input image dimension.

◆ New()

template<class TInputImage >
static Pointer itk::ImageSamplerBase< TInputImage >::New ( )
static

Method for creation through the object factory.

◆ PrintSelf()

template<class TInputImage >
void itk::ImageSamplerBase< TInputImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotected

PrintSelf.

◆ SelectingNewSamplesOnUpdateSupported()

template<class TInputImage >
virtual bool itk::ImageSamplerBase< TInputImage >::SelectingNewSamplesOnUpdateSupported ( ) const
inlinevirtual

◆ SelectNewSamplesOnUpdate()

template<class TInputImage >
virtual bool itk::ImageSamplerBase< TInputImage >::SelectNewSamplesOnUpdate ( )
virtual

******************** Other ******************** SelectNewSamplesOnUpdate. When this function is called, the sampler will generate a new sample set after calling Update(). The return bool is false when this feature is not supported by the sampler.

Reimplemented in itk::ImageFullSampler< TInputImage >, itk::ImageFullSampler< elx::ImageSamplerBase< TElastix >::InputImageType >, itk::ImageGridSampler< TInputImage >, and itk::ImageGridSampler< elx::ImageSamplerBase< TElastix >::InputImageType >.

◆ SetInputImageRegion() [1/2]

template<class TInputImage >
virtual void itk::ImageSamplerBase< TInputImage >::SetInputImageRegion ( const InputImageRegionType  _arg)
inlinevirtual

Set the region over which the samples will be taken.

Definition at line 132 of file itkImageSamplerBase.h.

◆ SetInputImageRegion() [2/2]

template<class TInputImage >
virtual void itk::ImageSamplerBase< TInputImage >::SetInputImageRegion ( const InputImageRegionType  _arg,
unsigned int  pos 
)
virtual

******************** Regions ******************** Set the region over which the samples will be taken.

◆ SetMask() [1/2]

template<class TInputImage >
virtual void itk::ImageSamplerBase< TInputImage >::SetMask ( const MaskType _arg)
inlinevirtual

Set the first mask. NB: the first mask is used to compute a bounding box in which samples are considered.

Definition at line 99 of file itkImageSamplerBase.h.

◆ SetMask() [2/2]

template<class TInputImage >
virtual void itk::ImageSamplerBase< TInputImage >::SetMask ( const MaskType _arg,
unsigned int  pos 
)
virtual

******************** Masks ******************** Set the masks.

◆ SetNumberOfInputImageRegions()

template<class TInputImage >
virtual void itk::ImageSamplerBase< TInputImage >::SetNumberOfInputImageRegions ( const unsigned int  _arg)
virtual

Set the number of input image regions.

◆ SetNumberOfMasks()

template<class TInputImage >
virtual void itk::ImageSamplerBase< TInputImage >::SetNumberOfMasks ( const unsigned int  _arg)
virtual

Set the number of masks.

◆ SetNumberOfSamples()

template<class TInputImage >
virtual void itk::ImageSamplerBase< TInputImage >::SetNumberOfSamples ( unsigned long  _arg)
virtual

◆ SetUseMultiThread()

template<class TInputImage >
virtual void itk::ImageSamplerBase< TInputImage >::SetUseMultiThread ( bool  _arg)
virtual
Todo:
: Temporary, should think about interface.

◆ UpdateAllMasks()

template<class TInputImage >
virtual void itk::ImageSamplerBase< TInputImage >::UpdateAllMasks ( )
protectedvirtual

UpdateAllMasks.

Field Documentation

◆ m_CroppedInputImageRegion

template<class TInputImage >
InputImageRegionType itk::ImageSamplerBase< TInputImage >::m_CroppedInputImageRegion
private

Definition at line 240 of file itkImageSamplerBase.h.

◆ m_DummyInputImageRegion

template<class TInputImage >
InputImageRegionType itk::ImageSamplerBase< TInputImage >::m_DummyInputImageRegion
private

Definition at line 241 of file itkImageSamplerBase.h.

◆ m_InputImageRegion

template<class TInputImage >
InputImageRegionType itk::ImageSamplerBase< TInputImage >::m_InputImageRegion
private

Definition at line 236 of file itkImageSamplerBase.h.

◆ m_InputImageRegionVector

template<class TInputImage >
InputImageRegionVectorType itk::ImageSamplerBase< TInputImage >::m_InputImageRegionVector
private

Definition at line 237 of file itkImageSamplerBase.h.

◆ m_Mask

template<class TInputImage >
MaskConstPointer itk::ImageSamplerBase< TInputImage >::m_Mask { nullptr }
private

Member variables.

Definition at line 233 of file itkImageSamplerBase.h.

◆ m_MaskVector

template<class TInputImage >
MaskVectorType itk::ImageSamplerBase< TInputImage >::m_MaskVector
private

Definition at line 234 of file itkImageSamplerBase.h.

◆ m_NumberOfInputImageRegions

template<class TInputImage >
unsigned int itk::ImageSamplerBase< TInputImage >::m_NumberOfInputImageRegions { 0 }
private

Definition at line 238 of file itkImageSamplerBase.h.

◆ m_NumberOfMasks

template<class TInputImage >
unsigned int itk::ImageSamplerBase< TInputImage >::m_NumberOfMasks { 0 }
private

Definition at line 235 of file itkImageSamplerBase.h.

◆ m_NumberOfSamples

template<class TInputImage >
unsigned long itk::ImageSamplerBase< TInputImage >::m_NumberOfSamples { 0 }
protected

Definition at line 225 of file itkImageSamplerBase.h.

◆ m_ThreaderSampleContainer

template<class TInputImage >
std::vector<ImageSampleContainerPointer> itk::ImageSamplerBase< TInputImage >::m_ThreaderSampleContainer
protected

Definition at line 226 of file itkImageSamplerBase.h.

◆ m_UseMultiThread

template<class TInputImage >
bool itk::ImageSamplerBase< TInputImage >::m_UseMultiThread { false }
protected

Definition at line 229 of file itkImageSamplerBase.h.



Generated on Wed 12 Apr 2023 for elastix by doxygen 1.9.6 elastix logo