go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkImageRandomSampler.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright UMC Utrecht and contributors
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkImageRandomSampler_h
19#define itkImageRandomSampler_h
20
22
23namespace itk
24{
38template <class TInputImage>
39class ITK_TEMPLATE_EXPORT ImageRandomSampler : public ImageRandomSamplerBase<TInputImage>
40{
41public:
43
47 using Pointer = SmartPointer<Self>;
48 using ConstPointer = SmartPointer<const Self>;
49
51 itkNewMacro(Self);
52
55
57 using typename Superclass::DataObjectPointer;
60 using typename Superclass::InputImageType;
61 using typename Superclass::InputImagePointer;
65 using typename Superclass::ImageSampleType;
69 using typename Superclass::MaskType;
70 using typename Superclass::InputImageSizeType;
71
73 itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension);
74
76 using InputImageIndexType = typename InputImageType::IndexType;
77 using InputImagePointType = typename InputImageType::PointType;
78
79protected:
81 ImageRandomSampler() = default;
83 ~ImageRandomSampler() override = default;
84
86 void
87 GenerateData() override;
88
89 void
90 ThreadedGenerateData(const InputImageRegionType & inputRegionForThread, ThreadIdType threadId) override;
91};
92
93} // end namespace itk
94
95#ifndef ITK_MANUAL_INSTANTIATION
96# include "itkImageRandomSampler.hxx"
97#endif
98
99#endif // end #ifndef itkImageRandomSampler_h
This class is a base class for any image sampler that randomly picks samples.
SpatialObject< Self::InputImageDimension > MaskType
typename ImageSampleContainerType::Pointer ImageSampleContainerPointer
Samples randomly some voxels of an image.
~ImageRandomSampler() override=default
itkStaticConstMacro(InputImageDimension, unsigned int, Superclass::InputImageDimension)
typename InputImageType::PointType InputImagePointType
SmartPointer< const Self > ConstPointer
typename InputImageType::IndexType InputImageIndexType
ITK_DISALLOW_COPY_AND_MOVE(ImageRandomSampler)
void GenerateData() override
void ThreadedGenerateData(const InputImageRegionType &inputRegionForThread, ThreadIdType threadId) override
A class that defines an image sample, which is the coordinates of a point and its value.
typename InputImageType::SizeType InputImageSizeType
typename ImageSampleType::RealType ImageSampleValueType
TOutputVectorContainer OutputVectorContainerType
typename OutputVectorContainerType::Pointer OutputVectorContainerPointer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.


Generated on 2023-01-13 for elastix by doxygen 1.9.6 elastix logo