Loading...
Searching...
No Matches
itkImageRandomSampler.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht and contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#ifndef itkImageRandomSampler_h
#define itkImageRandomSampler_h
#include "itkImageRandomSamplerBase.h"
namespace itk
{
template <class TInputImage>
class ITK_TEMPLATE_EXPORT ImageRandomSampler : public ImageRandomSamplerBase<TInputImage>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(ImageRandomSampler);
using Self = ImageRandomSampler;
using Superclass = ImageRandomSamplerBase<TInputImage>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkNewMacro(Self);
itkTypeMacro(ImageRandomSampler, ImageRandomSamplerBase);
using typename Superclass::DataObjectPointer;
using typename Superclass::OutputVectorContainerType;
using typename Superclass::OutputVectorContainerPointer;
using typename Superclass::InputImageType;
using typename Superclass::InputImagePointer;
using typename Superclass::InputImageConstPointer;
using typename Superclass::InputImageRegionType;
using typename Superclass::InputImagePixelType;
using typename Superclass::ImageSampleType;
using typename Superclass::ImageSampleValueType;
using typename Superclass::ImageSampleContainerType;
using typename Superclass::ImageSampleContainerPointer;
using typename Superclass::MaskType;
using typename Superclass::InputImageSizeType;
itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension);
using InputImageIndexType = typename InputImageType::IndexType;
using InputImagePointType = typename InputImageType::PointType;
protected:
ImageRandomSampler() = default;
~ImageRandomSampler() override = default;
void
GenerateData() override;
private:
struct UserData
{
ITK_DISALLOW_COPY_AND_MOVE(UserData);
const std::vector<double> & m_RandomNumberList;
const InputImageType & m_InputImage;
InputImageIndexType m_RegionIndex{};
InputImageSizeType m_RegionSize{};
std::vector<ImageSampleType> & m_Samples;
};
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
ThreaderCallback(void * arg);
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkImageRandomSampler.hxx"
#endif
#endif // end #ifndef itkImageRandomSampler_h
itk::ImageRandomSamplerBase::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition itkImageSamplerBase.h:68
itk::ImageRandomSamplerBase::ImageSampleType
ImageSample< InputImageType > ImageSampleType
Definition itkImageSamplerBase.h:76
itk::ImageRandomSamplerBase::ImageSampleContainerType
VectorDataContainer< std::vcl_size_t, ImageSampleType > ImageSampleContainerType
Definition itkImageSamplerBase.h:77
itk::ImageRandomSamplerBase::InputImageType
TInputImage InputImageType
Definition itkImageSamplerBase.h:66
itk::ImageRandomSamplerBase::ImageRandomSamplerBase
ImageRandomSamplerBase()
itk::ImageRandomSamplerBase::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition itkImageSamplerBase.h:69
itk::ImageRandomSamplerBase::ImageSampleContainerPointer
typename ImageSampleContainerType::Pointer ImageSampleContainerPointer
Definition itkImageSamplerBase.h:78
itk::ImageRandomSamplerBase::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition itkImageSamplerBase.h:67
itk::ImageRandomSamplerBase::MaskType
ImageMaskSpatialObject< Self::InputImageDimension > MaskType
Definition itkImageSamplerBase.h:84
itk::ImageRandomSamplerBase::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition itkImageSamplerBase.h:70
itk::ImageRandomSampler::ThreaderCallback
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ThreaderCallback(void *arg)
itk::ImageRandomSampler::~ImageRandomSampler
~ImageRandomSampler() override=default
itk::ImageRandomSampler::Self
ImageRandomSampler Self
Definition itkImageRandomSampler.h:45
itk::ImageRandomSampler::itkStaticConstMacro
itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension)
itk::ImageRandomSampler::InputImagePointType
typename InputImageType::PointType InputImagePointType
Definition itkImageRandomSampler.h:77
itk::ImageRandomSampler::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkImageRandomSampler.h:48
itk::ImageRandomSampler::InputImageIndexType
typename InputImageType::IndexType InputImageIndexType
Definition itkImageRandomSampler.h:76
itk::ImageRandomSampler::ImageRandomSampler
ImageRandomSampler()=default
itk::ImageRandomSampler::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(ImageRandomSampler)
itk::ImageRandomSampler::GenerateData
void GenerateData() override
itk::ImageRandomSampler::Superclass
ImageRandomSamplerBase< TInputImage > Superclass
Definition itkImageRandomSampler.h:46
itk::ImageRandomSampler::Pointer
SmartPointer< Self > Pointer
Definition itkImageRandomSampler.h:47
itk::ImageSamplerBase::InputImageSizeType
typename InputImageType::SizeType InputImageSizeType
Definition itkImageSamplerBase.h:79
itk::ImageSamplerBase::ImageSampleValueType
typename ImageSampleType::RealType ImageSampleValueType
Definition itkImageSamplerBase.h:83
itk::VectorContainerSource< VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >::OutputVectorContainerType
VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > OutputVectorContainerType
Definition itkVectorContainerSource.h:51
itk::VectorContainerSource< VectorDataContainer< std::vcl_size_t, ImageSample< TInputImage > > >::OutputVectorContainerPointer
typename OutputVectorContainerType::Pointer OutputVectorContainerPointer
Definition itkVectorContainerSource.h:52
itkImageRandomSamplerBase.h
itk
Definition itkAdvancedImageToImageMetric.h:43
itk::ImageRandomSampler::UserData
Definition itkImageRandomSampler.h:91
itk::ImageRandomSampler::UserData::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(UserData)
itk::ImageRandomSampler::UserData::m_RegionIndex
InputImageIndexType m_RegionIndex
Definition itkImageRandomSampler.h:96
itk::ImageRandomSampler::UserData::m_RandomNumberList
const std::vector< double > & m_RandomNumberList
Definition itkImageRandomSampler.h:94
itk::ImageRandomSampler::UserData::m_RegionSize
InputImageSizeType m_RegionSize
Definition itkImageRandomSampler.h:97
itk::ImageRandomSampler::UserData::m_InputImage
const InputImageType & m_InputImage
Definition itkImageRandomSampler.h:95
itk::ImageRandomSampler::UserData::m_Samples
std::vector< ImageSampleType > & m_Samples
Definition itkImageRandomSampler.h:98

Generated on 1768596610 for elastix by 1.15.0 |