ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkGridImageSource.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkGridImageSource_h
19#define itkGridImageSource_h
20
22#include "itkFixedArray.h"
24#include "itkVectorContainer.h"
25
26#include "vnl/vnl_vector.h"
27
28namespace itk
29{
57template <typename TOutputImage>
58class ITK_TEMPLATE_EXPORT GridImageSource : public GenerateImageSource<TOutputImage>
59{
60public:
61 ITK_DISALLOW_COPY_AND_MOVE(GridImageSource);
62
68
70 itkOverrideGetNameOfClassMacro(GridImageSource);
71
73 itkNewMacro(Self);
74
75 using RealType = double;
76
78 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
79
81 using ImageType = TOutputImage;
82 using ImageRegionType = typename TOutputImage::RegionType;
83 using PixelType = typename TOutputImage::PixelType;
84 using SpacingType = typename TOutputImage::SpacingType;
85 using OriginType = typename TOutputImage::PointType;
86 using DirectionType = typename TOutputImage::DirectionType;
87 using SizeType = typename TOutputImage::SizeType;
88
93 using PixelArrayType = vnl_vector<RealType>;
95
97 itkSetObjectMacro(KernelFunction, KernelFunctionType);
98 itkGetConstReferenceObjectMacro(KernelFunction, KernelFunctionType);
100
103 itkSetMacro(Sigma, ArrayType);
104 itkGetConstReferenceMacro(Sigma, ArrayType);
106
108 itkSetMacro(GridSpacing, ArrayType);
109 itkGetConstReferenceMacro(GridSpacing, ArrayType);
111
113 itkSetMacro(GridOffset, ArrayType);
114 itkGetConstReferenceMacro(GridOffset, ArrayType);
116
118 itkSetMacro(WhichDimensions, BoolArrayType);
119 itkGetConstReferenceMacro(WhichDimensions, BoolArrayType);
121
123 itkSetMacro(Scale, RealType);
124 itkGetConstReferenceMacro(Scale, RealType);
126
127protected:
129 ~GridImageSource() override = default;
130 void
131 PrintSelf(std::ostream & os, Indent indent) const override;
132
133 void
134 DynamicThreadedGenerateData(const ImageRegionType & outputRegionForThread) override;
135
136
137 void
139
140private:
143
145
147
149
151
153
155};
156} // end namespace itk
157
158#ifndef ITK_MANUAL_INSTANTIATION
159# include "itkGridImageSource.hxx"
160#endif
161
162#endif
Simulate a standard C array with copy semantics.
void BeforeThreadedGenerateData() override
typename TOutputImage::PointType OriginType
typename TOutputImage::SpacingType SpacingType
static constexpr unsigned int ImageDimension
typename TOutputImage::PixelType PixelType
SmartPointer< const Self > ConstPointer
GenerateImageSource< TOutputImage > Superclass
FixedArray< RealType, Self::ImageDimension > ArrayType
void DynamicThreadedGenerateData(const ImageRegionType &outputRegionForThread) override
SmartPointer< Self > Pointer
KernelFunctionType::Pointer m_KernelFunction
void PrintSelf(std::ostream &os, Indent indent) const override
PixelArrayContainerType::Pointer m_PixelArrays
~GridImageSource() override=default
typename TOutputImage::DirectionType DirectionType
typename TOutputImage::RegionType ImageRegionType
typename TOutputImage::SizeType SizeType
FixedArray< bool, Self::ImageDimension > BoolArrayType
VectorContainer< PixelArrayType > PixelArrayContainerType
vnl_vector< RealType > PixelArrayType
BoolArrayType m_WhichDimensions
KernelFunctionBase< double > KernelFunctionType
Control indentation during Print() invocation.
Definition itkIndent.h:50
Kernel used for density estimation and nonparametric regression.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
detail::VectorContainer< std::conditional_t< std::is_void_v< T2 >, SizeValueType, T1 >, std::conditional_t< std::is_void_v< T2 >, T1, T2 > > VectorContainer