go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
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 >:

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 InputImageConstPointer = typename InputImageType::ConstPointer
 
using InputImageIndexType = typename InputImageType::IndexType
 
using InputImagePixelType = typename InputImageType::PixelType
 
using InputImagePointer = typename InputImageType::Pointer
 
using InputImagePointType = typename InputImageType::PointType
 
using InputImagePointValueType = typename InputImagePointType::ValueType
 
using InputImageRegionType = typename InputImageType::RegionType
 
using InputImageRegionVectorType = std::vector<InputImageRegionType>
 
using InputImageSizeType = typename InputImageType::SizeType
 
using InputImageType = TInputImage
 
using MaskConstPointer = typename MaskType::ConstPointer
 
using MaskPointer = typename MaskType::Pointer
 
using MaskType = ImageMaskSpatialObject<Self::InputImageDimension>
 
using MaskVectorType = std::vector<MaskConstPointer>
 
using Pointer = SmartPointer<Self>
 
using Self = ImageSamplerBase
 
using Superclass = VectorContainerSource<VectorDataContainer<std::vcl_size_t, ImageSample<TInputImage>>>
 
- Public Types inherited from itk::VectorContainerSource< VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >
using ConstPointer
 
using OutputVectorContainerPointer
 
using OutputVectorContainerType
 
using Pointer
 
using Self
 
using Superclass
 

Public Member Functions

virtual const char * GetClassName () const
 
virtual const InputImageRegionTypeGetCroppedInputImageRegion ()
 
const InputImageTypeGetInput ()
 
const InputImageTypeGetInput (unsigned int idx)
 
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
 
OutputVectorContainerTypeGetOutput ()
 
 ITK_DISALLOW_COPY_AND_MOVE (ImageSamplerBase)
 
 itkStaticConstMacro (InputImageDimension, unsigned int, InputImageType::ImageDimension)
 
DataObject::Pointer MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override
 
virtual bool SelectingNewSamplesOnUpdateSupported () const
 
virtual bool SelectNewSamplesOnUpdate ()
 
void SetInput (const InputImageType *input)
 
void SetInput (unsigned int idx, const InputImageType *input)
 
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::VectorContainerSource< VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >
OutputVectorContainerTypeGetOutput ()
 
OutputVectorContainerTypeGetOutput (unsigned int idx)
 
virtual void GraftNthOutput (unsigned int idx, DataObject *output)
 
virtual void GraftOutput (DataObject *output)
 
 ITK_DISALLOW_COPY_AND_MOVE (VectorContainerSource)
 
DataObjectPointer MakeOutput (ProcessObject::DataObjectPointerArraySizeType idx) override
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from itk::VectorContainerSource< VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >
static Pointer New ()
 

Protected Member Functions

virtual bool CheckInputImageRegions ()
 
void CropInputImageRegion ()
 
void GenerateInputRequestedRegion () override
 
 ImageSamplerBase ()
 
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::VectorContainerSource< VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >
void PrintSelf (std::ostream &os, Indent indent) const override
 
 VectorContainerSource ()
 
 ~VectorContainerSource () override=default
 

Static Protected Member Functions

static std::vector< InputImageRegionTypeSplitRegion (const InputImageRegionType &inputRegion, const vcl_size_t requestedNumberOfSubregions)
 

Protected Attributes

unsigned long m_NumberOfSamples { 0 }
 
bool m_UseMultiThread { true }
 

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 52 of file itkImageSamplerBase.h.

◆ ImageSampleContainerPointer

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

Definition at line 78 of file itkImageSamplerBase.h.

◆ ImageSampleContainerType

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

Definition at line 77 of file itkImageSamplerBase.h.

◆ ImageSampleType

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

Other typdefs.

Definition at line 76 of file itkImageSamplerBase.h.

◆ ImageSampleValueType

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

Definition at line 83 of file itkImageSamplerBase.h.

◆ InputImageConstPointer

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::InputImageConstPointer = typename InputImageType::ConstPointer

Definition at line 68 of file itkImageSamplerBase.h.

◆ InputImageIndexType

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

Definition at line 80 of file itkImageSamplerBase.h.

◆ InputImagePixelType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::InputImagePixelType = typename InputImageType::PixelType

Definition at line 70 of file itkImageSamplerBase.h.

◆ InputImagePointer

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::InputImagePointer = typename InputImageType::Pointer

Definition at line 67 of file itkImageSamplerBase.h.

◆ InputImagePointType

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

Definition at line 81 of file itkImageSamplerBase.h.

◆ InputImagePointValueType

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

Definition at line 82 of file itkImageSamplerBase.h.

◆ InputImageRegionType

template<class TInputImage >
using itk::ImageSamplerBase< TInputImage >::InputImageRegionType = typename InputImageType::RegionType

Definition at line 69 of file itkImageSamplerBase.h.

◆ InputImageRegionVectorType

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

Definition at line 88 of file itkImageSamplerBase.h.

◆ InputImageSizeType

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

Definition at line 79 of file itkImageSamplerBase.h.

◆ InputImageType

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

Some Image related typedefs.

Definition at line 66 of file itkImageSamplerBase.h.

◆ MaskConstPointer

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

Definition at line 86 of file itkImageSamplerBase.h.

◆ MaskPointer

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

Definition at line 85 of file itkImageSamplerBase.h.

◆ MaskType

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

Definition at line 84 of file itkImageSamplerBase.h.

◆ MaskVectorType

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

Definition at line 87 of file itkImageSamplerBase.h.

◆ Pointer

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

Definition at line 51 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 = VectorContainerSource<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 ( )
protected

The constructor.

◆ ~ImageSamplerBase()

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

The destructor.

Member Function Documentation

◆ 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()

◆ GetCroppedInputImageRegion()

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

Get a handle to the cropped InputImageregion.

◆ GetInput() [1/2]

template<class TInputImage >
const InputImageType * itk::ImageSamplerBase< TInputImage >::GetInput ( )

Get the input image of this process object.

◆ GetInput() [2/2]

template<class TInputImage >
const InputImageType * itk::ImageSamplerBase< TInputImage >::GetInput ( unsigned int idx)

Get the input image of this process object.

◆ GetInputImageRegion() [1/2]

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

Get the first input image region.

Definition at line 172 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 139 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

◆ GetOutput()

template<class TInputImage >
OutputVectorContainerType * itk::ImageSamplerBase< TInputImage >::GetOutput ( )

Get the output Mesh of this process object.

◆ 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.

◆ MakeOutput()

template<class TInputImage >
DataObject::Pointer itk::ImageSamplerBase< TInputImage >::MakeOutput ( ProcessObject::DataObjectPointerArraySizeType idx)
override

Create a valid output.

◆ 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 >.

◆ SetInput() [1/2]

template<class TInputImage >
void itk::ImageSamplerBase< TInputImage >::SetInput ( const InputImageType * input)

Set the input image of this process object.

◆ SetInput() [2/2]

template<class TInputImage >
void itk::ImageSamplerBase< TInputImage >::SetInput ( unsigned int idx,
const InputImageType * input )

Set the input image of this process object.

◆ 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 160 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 127 of file itkImageSamplerBase.h.

◆ SetMask() [2/2]

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

Prepare the output. ******************** 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

Allows disabling the use of multi-threading, by SetUseMultiThread(false).

◆ SplitRegion()

template<class TInputImage >
static std::vector< InputImageRegionType > itk::ImageSamplerBase< TInputImage >::SplitRegion ( const InputImageRegionType & inputRegion,
const vcl_size_t requestedNumberOfSubregions )
staticprotected

Splits the input region into subregions, and returns them all.

◆ 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 269 of file itkImageSamplerBase.h.

◆ m_DummyInputImageRegion

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

Definition at line 270 of file itkImageSamplerBase.h.

◆ m_InputImageRegion

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

Definition at line 265 of file itkImageSamplerBase.h.

◆ m_InputImageRegionVector

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

Definition at line 266 of file itkImageSamplerBase.h.

◆ m_Mask

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

Member variables.

Definition at line 262 of file itkImageSamplerBase.h.

◆ m_MaskVector

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

Definition at line 263 of file itkImageSamplerBase.h.

◆ m_NumberOfInputImageRegions

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

Definition at line 267 of file itkImageSamplerBase.h.

◆ m_NumberOfMasks

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

Definition at line 264 of file itkImageSamplerBase.h.

◆ m_NumberOfSamples

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

Definition at line 250 of file itkImageSamplerBase.h.

◆ m_UseMultiThread

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

UseMultiThread == true indicated that the sampler may use multi-threading (if implemented), while UseMultiThread == false indicates that the sampler should not use multi-threading

Definition at line 254 of file itkImageSamplerBase.h.



Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo