Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages |
#include <elxRandomSampler.h>
An interpolator based on the itk::ImageRandomSampler.
This image sampler randomly samples 'NumberOfSamples' voxels in the InputImageRegion. Voxels may be selected multiple times. If a mask is given, the sampler tries to find samples within the mask. If the mask is very sparse, this may take some time. In this case, consider using the RandomSparseMask image sampler.
This sampler is suitable to used in combination with the NewSamplesEveryIteration parameter (defined in the elx::OptimizerBase).
The parameters used in this class are:
ImageSampler: Select this image sampler as follows:
(ImageSampler "Random")
NumberOfSpatialSamples: The number of image voxels used for computing the metric value and its derivative in each iteration. Must be given for each resolution.
example: (NumberOfSpatialSamples 2048 2048 4000)
The default is 5000.
Definition at line 52 of file elxRandomSampler.h.
Public Member Functions | |
void | BeforeEachResolution (void) override |
elxClassNameMacro ("Random") | |
virtual const char * | GetClassName () const |
itkStaticConstMacro (InputImageDimension, unsigned int, Superclass1::InputImageDimension) | |
Public Member Functions inherited from itk::ImageRandomSampler< elx::ImageSamplerBase< TElastix >::InputImageType > | |
virtual const char * | GetClassName () const |
itkStaticConstMacro (InputImageDimension, unsigned int, Superclass::InputImageDimension) | |
Public Member Functions inherited from itk::ImageRandomSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType > | |
virtual const char * | GetClassName () const |
itkStaticConstMacro (InputImageDimension, unsigned int, Superclass::InputImageDimension) | |
Public Member Functions inherited from itk::ImageSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType > | |
virtual const char * | GetClassName () const |
virtual const InputImageRegionType & | GetCroppedInputImageRegion () |
virtual const InputImageRegionType & | GetInputImageRegion (unsigned int pos) const |
virtual const InputImageRegionType & | GetInputImageRegion (void) const |
virtual const MaskType * | GetMask (unsigned int pos) const |
virtual const MaskType * | GetMask (void) const |
virtual unsigned int | GetNumberOfInputImageRegions () const |
virtual unsigned int | GetNumberOfMasks () const |
virtual unsigned long | GetNumberOfSamples () const |
itkStaticConstMacro (InputImageDimension, unsigned int, InputImageType::ImageDimension) | |
virtual bool | SelectingNewSamplesOnUpdateSupported (void) const |
virtual bool | SelectNewSamplesOnUpdate (void) |
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< elx::ImageSamplerBase< TElastix >::InputImageType, VectorDataContainer< std::vcl_size_t, ImageSample< elx::ImageSamplerBase< TElastix >::InputImageType > > > | |
virtual void | AfterThreadedGenerateData (void) |
virtual void | BeforeThreadedGenerateData (void) |
void | GenerateData (void) override |
virtual const char * | GetClassName () const |
const InputImageType * | GetInput (unsigned int idx) |
const InputImageType * | GetInput (void) |
OutputVectorContainerType * | GetOutput (void) |
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< VectorDataContainer< std::vcl_size_t, ImageSample< elx::ImageSamplerBase< TElastix >::InputImageType > > > | |
virtual const char * | GetClassName () const |
OutputVectorContainerType * | GetOutput (unsigned int idx) |
OutputVectorContainerType * | GetOutput (void) |
virtual void | GraftNthOutput (unsigned int idx, DataObject *output) |
virtual void | GraftOutput (DataObject *output) |
virtual DataObjectPointer | MakeOutput (unsigned int idx) |
Public Member Functions inherited from itk::ImageSamplerBase< TElastix > | |
virtual const char * | GetClassName () const |
virtual const InputImageRegionType & | GetCroppedInputImageRegion () |
virtual const InputImageRegionType & | GetInputImageRegion (unsigned int pos) const |
virtual const InputImageRegionType & | GetInputImageRegion (void) const |
virtual const MaskType * | GetMask (unsigned int pos) const |
virtual const MaskType * | GetMask (void) const |
virtual unsigned int | GetNumberOfInputImageRegions () const |
virtual unsigned int | GetNumberOfMasks () const |
virtual unsigned long | GetNumberOfSamples () const |
itkStaticConstMacro (InputImageDimension, unsigned int, InputImageType::ImageDimension) | |
virtual bool | SelectingNewSamplesOnUpdateSupported (void) const |
virtual bool | SelectNewSamplesOnUpdate (void) |
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< TElastix, VectorDataContainer< std::vcl_size_t, ImageSample< TElastix > > > | |
virtual void | AfterThreadedGenerateData (void) |
virtual void | BeforeThreadedGenerateData (void) |
void | GenerateData (void) override |
virtual const char * | GetClassName () const |
const InputImageType * | GetInput (unsigned int idx) |
const InputImageType * | GetInput (void) |
OutputVectorContainerType * | GetOutput (void) |
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< VectorDataContainer< std::vcl_size_t, ImageSample< TElastix > > > | |
virtual const char * | GetClassName () const |
OutputVectorContainerType * | GetOutput (unsigned int idx) |
OutputVectorContainerType * | GetOutput (void) |
virtual void | GraftNthOutput (unsigned int idx, DataObject *output) |
virtual void | GraftOutput (DataObject *output) |
virtual DataObjectPointer | MakeOutput (unsigned int idx) |
Private Member Functions | |
void | operator= (const Self &) |
RandomSampler (const Self &) | |
Additional Inherited Members | |
Protected Attributes inherited from itk::ImageRandomSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType > | |
std::vector< double > | m_RandomNumberList |
Protected Attributes inherited from itk::ImageSamplerBase< elx::ImageSamplerBase< TElastix >::InputImageType > | |
unsigned long | m_NumberOfSamples |
std::vector< ImageSampleContainerPointer > | m_ThreaderSampleContainer |
bool | m_UseMultiThread |
Protected Attributes inherited from itk::ImageSamplerBase< TElastix > | |
unsigned long | m_NumberOfSamples |
std::vector< ImageSampleContainerPointer > | m_ThreaderSampleContainer |
bool | m_UseMultiThread |
typedef Superclass2::ConfigurationPointer elastix::RandomSampler< TElastix >::ConfigurationPointer |
Definition at line 104 of file elxRandomSampler.h.
typedef Superclass2::ConfigurationType elastix::RandomSampler< TElastix >::ConfigurationType |
Definition at line 103 of file elxRandomSampler.h.
typedef itk::SmartPointer< const Self > elastix::RandomSampler< TElastix >::ConstPointer |
Definition at line 68 of file elxRandomSampler.h.
typedef Superclass1::DataObjectPointer elastix::RandomSampler< TElastix >::DataObjectPointer |
Typedefs inherited from the superclass.
Definition at line 83 of file elxRandomSampler.h.
typedef Superclass2::ElastixPointer elastix::RandomSampler< TElastix >::ElastixPointer |
Definition at line 102 of file elxRandomSampler.h.
typedef Superclass2::ElastixType elastix::RandomSampler< TElastix >::ElastixType |
Typedefs inherited from Elastix.
Definition at line 101 of file elxRandomSampler.h.
typedef Superclass1::ImageSampleContainerType elastix::RandomSampler< TElastix >::ImageSampleContainerType |
Definition at line 92 of file elxRandomSampler.h.
typedef Superclass1::ImageSampleType elastix::RandomSampler< TElastix >::ImageSampleType |
Definition at line 91 of file elxRandomSampler.h.
typedef Superclass1::InputImageConstPointer elastix::RandomSampler< TElastix >::InputImageConstPointer |
Definition at line 88 of file elxRandomSampler.h.
typedef Superclass1::InputImageIndexType elastix::RandomSampler< TElastix >::InputImageIndexType |
Definition at line 94 of file elxRandomSampler.h.
typedef Superclass1::InputImagePixelType elastix::RandomSampler< TElastix >::InputImagePixelType |
Definition at line 90 of file elxRandomSampler.h.
typedef Superclass1::InputImagePointer elastix::RandomSampler< TElastix >::InputImagePointer |
Definition at line 87 of file elxRandomSampler.h.
typedef Superclass1::InputImagePointType elastix::RandomSampler< TElastix >::InputImagePointType |
Definition at line 95 of file elxRandomSampler.h.
typedef Superclass1::InputImageRegionType elastix::RandomSampler< TElastix >::InputImageRegionType |
Definition at line 89 of file elxRandomSampler.h.
typedef Superclass1::InputImageType elastix::RandomSampler< TElastix >::InputImageType |
Definition at line 86 of file elxRandomSampler.h.
typedef Superclass2::ITKBaseType elastix::RandomSampler< TElastix >::ITKBaseType |
Definition at line 107 of file elxRandomSampler.h.
typedef Superclass1::MaskType elastix::RandomSampler< TElastix >::MaskType |
Definition at line 93 of file elxRandomSampler.h.
typedef Superclass1::OutputVectorContainerPointer elastix::RandomSampler< TElastix >::OutputVectorContainerPointer |
Definition at line 85 of file elxRandomSampler.h.
typedef Superclass1::OutputVectorContainerType elastix::RandomSampler< TElastix >::OutputVectorContainerType |
Definition at line 84 of file elxRandomSampler.h.
typedef itk::SmartPointer< Self > elastix::RandomSampler< TElastix >::Pointer |
Definition at line 67 of file elxRandomSampler.h.
typedef Superclass2::RegistrationPointer elastix::RandomSampler< TElastix >::RegistrationPointer |
Definition at line 106 of file elxRandomSampler.h.
typedef Superclass2::RegistrationType elastix::RandomSampler< TElastix >::RegistrationType |
Definition at line 105 of file elxRandomSampler.h.
typedef RandomSampler elastix::RandomSampler< TElastix >::Self |
Standard ITK-stuff.
Definition at line 62 of file elxRandomSampler.h.
typedef itk::ImageRandomSampler< typename elx::ImageSamplerBase< TElastix >::InputImageType > elastix::RandomSampler< TElastix >::Superclass1 |
Definition at line 65 of file elxRandomSampler.h.
typedef elx::ImageSamplerBase< TElastix > elastix::RandomSampler< TElastix >::Superclass2 |
Definition at line 66 of file elxRandomSampler.h.
|
inlineprotected |
The constructor.
Definition at line 117 of file elxRandomSampler.h.
|
inlineoverrideprotected |
The destructor.
Definition at line 119 of file elxRandomSampler.h.
|
private |
The private constructor.
|
override |
Execute stuff before each resolution:
elastix::RandomSampler< TElastix >::elxClassNameMacro | ( | "Random" | ) |
Name of this class. Use this name in the parameter file to select this specific interpolator.
example: (ImageSampler "Random")
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ImageRandomSampler< elx::ImageSamplerBase< TElastix >::InputImageType >.
elastix::RandomSampler< TElastix >::itkStaticConstMacro | ( | InputImageDimension | , |
unsigned int | , | ||
Superclass1::InputImageDimension | |||
) |
The input image dimension.
|
static |
Method for creation through the object factory.
|
private |
The private copy constructor.
Generated on 1667476801 for elastix by 1.9.4 |