go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkTransformToSpatialJacobianSource.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 itkTransformToSpatialJacobianSource_h
19#define itkTransformToSpatialJacobianSource_h
20
23#include "itkImageSource.h"
24
25namespace itk
26{
27
66template <class TOutputImage, class TTransformPrecisionType = double>
67class ITK_TEMPLATE_EXPORT TransformToSpatialJacobianSource : public ImageSource<TOutputImage>
68{
69public:
71
74 using Superclass = ImageSource<TOutputImage>;
75 using Pointer = SmartPointer<Self>;
76 using ConstPointer = SmartPointer<const Self>;
77
78 using OutputImageType = TOutputImage;
79 using OutputImagePointer = typename OutputImageType::Pointer;
80 using OutputImageConstPointer = typename OutputImageType::ConstPointer;
81 using OutputImageRegionType = typename OutputImageType::RegionType;
82
84 itkNewMacro(Self);
85
87 itkTypeMacro(TransformToSpatialJacobianSource, ImageSource);
88
90 itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension);
91
96
98 using PixelType = typename OutputImageType::PixelType;
99 // typedef typename PixelType::ValueType PixelValueType;
100 using RegionType = typename OutputImageType::RegionType;
101 using SizeType = typename RegionType::SizeType;
102 using IndexType = typename OutputImageType::IndexType;
103 using PointType = typename OutputImageType::PointType;
104 using SpacingType = typename OutputImageType::SpacingType;
105 using OriginType = typename OutputImageType::PointType;
106 using DirectionType = typename OutputImageType::DirectionType;
107
109 using ImageBaseType = ImageBase<Self::ImageDimension>;
110
118 itkSetConstObjectMacro(Transform, TransformType);
119
121 itkGetConstObjectMacro(Transform, TransformType);
122
124 virtual void
125 SetOutputSize(const SizeType & size);
126
128 virtual const SizeType &
130
133 virtual void
134 SetOutputIndex(const IndexType & index);
135
137 virtual const IndexType &
139
141 itkSetMacro(OutputRegion, OutputImageRegionType);
142
144 itkGetConstReferenceMacro(OutputRegion, OutputImageRegionType);
145
147 itkSetMacro(OutputSpacing, SpacingType);
148 virtual void
149 SetOutputSpacing(const double * values);
150
152 itkGetConstReferenceMacro(OutputSpacing, SpacingType);
153
155 itkSetMacro(OutputOrigin, OriginType);
156 virtual void
157 SetOutputOrigin(const double * values);
158
160 itkGetConstReferenceMacro(OutputOrigin, OriginType);
161
163 itkSetMacro(OutputDirection, DirectionType);
164 itkGetConstReferenceMacro(OutputDirection, DirectionType);
165
167 void
169
171 void
173
176 void
178
180 ModifiedTimeType
181 GetMTime() const override;
182
183protected:
186
187 void
188 PrintSelf(std::ostream & os, Indent indent) const override;
189
193 void
194 ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override;
195
199 void
200 NonlinearThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId);
201
205 void
207
208private:
210 RegionType m_OutputRegion{}; // region of the output image
213 }; // Coordinate transform to use
214 SpacingType m_OutputSpacing{ 1.0 }; // output image spacing
215 OriginType m_OutputOrigin{}; // output image origin
216 DirectionType m_OutputDirection{ DirectionType::GetIdentity() }; // output image direction cosines
217};
218
219} // end namespace itk
220
221#ifndef ITK_MANUAL_INSTANTIATION
222# include "itkTransformToSpatialJacobianSource.hxx"
223#endif
224
225#endif // end #ifndef itkTransformToSpatialJacobianSource_h
Implementation of an Identity Transform.
Transform maps points, vectors and covariant vectors from an input space to an output space.
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
SmartPointer< const Self > ConstPointer
Generate the spatial Jacobian matrix from a coordinate transform.
virtual void SetOutputOrigin(const double *values)
typename OutputImageType::RegionType OutputImageRegionType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
virtual void SetOutputSize(const SizeType &size)
typename OutputImageType::DirectionType DirectionType
virtual void SetOutputSpacing(const double *values)
typename OutputImageType::SpacingType SpacingType
typename OutputImageType::ConstPointer OutputImageConstPointer
virtual void SetOutputIndex(const IndexType &index)
virtual const IndexType & GetOutputIndex()
ITK_DISALLOW_COPY_AND_MOVE(TransformToSpatialJacobianSource)
itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension)
void PrintSelf(std::ostream &os, Indent indent) const override
~TransformToSpatialJacobianSource() override=default
ModifiedTimeType GetMTime() const override
void NonlinearThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
typename TransformType::SpatialJacobianType SpatialJacobianType
typename TransformType::ConstPointer TransformPointerType
void SetOutputParametersFromImage(const ImageBaseType *image)
virtual const SizeType & GetOutputSize()


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