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
22#include "itkImageSource.h"
23
24namespace itk
25{
26
65template< class TOutputImage,
66class TTransformPrecisionType = double >
68 public ImageSource< TOutputImage >
69{
70public:
71
74 typedef ImageSource< TOutputImage > Superclass;
76 typedef SmartPointer< const Self > ConstPointer;
77
78 typedef TOutputImage OutputImageType;
79 typedef typename OutputImageType::Pointer OutputImagePointer;
80 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
81 typedef typename OutputImageType::RegionType OutputImageRegionType;
82
84 itkNewMacro( Self );
85
87 itkTypeMacro( TransformToSpatialJacobianSource, ImageSource );
88
90 itkStaticConstMacro( ImageDimension, unsigned int,
91 TOutputImage::ImageDimension );
92
94 typedef AdvancedTransform< TTransformPrecisionType,
95 itkGetStaticConstMacro( ImageDimension ),
96 itkGetStaticConstMacro( ImageDimension ) > TransformType;
99
101 typedef typename OutputImageType::PixelType PixelType;
102 //typedef typename PixelType::ValueType PixelValueType;
103 typedef typename OutputImageType::RegionType RegionType;
104 typedef typename RegionType::SizeType SizeType;
105 typedef typename OutputImageType::IndexType IndexType;
106 typedef typename OutputImageType::PointType PointType;
107 typedef typename OutputImageType::SpacingType SpacingType;
108 typedef typename OutputImageType::PointType OriginType;
109 typedef typename OutputImageType::DirectionType DirectionType;
110
112 typedef ImageBase< itkGetStaticConstMacro( ImageDimension ) > ImageBaseType;
113
121 itkSetConstObjectMacro( Transform, TransformType );
122
124 itkGetConstObjectMacro( Transform, TransformType );
125
127 virtual void SetOutputSize( const SizeType & size );
128
130 virtual const SizeType & GetOutputSize();
131
134 virtual void SetOutputIndex( const IndexType & index );
135
137 virtual const IndexType & GetOutputIndex();
138
140 itkSetMacro( OutputRegion, OutputImageRegionType );
141
143 itkGetConstReferenceMacro( OutputRegion, OutputImageRegionType );
144
146 itkSetMacro( OutputSpacing, SpacingType );
147 virtual void SetOutputSpacing( const double * values );
148
150 itkGetConstReferenceMacro( OutputSpacing, SpacingType );
151
153 itkSetMacro( OutputOrigin, OriginType );
154 virtual void SetOutputOrigin( const double * values );
155
157 itkGetConstReferenceMacro( OutputOrigin, OriginType );
158
160 itkSetMacro( OutputDirection, DirectionType );
161 itkGetConstReferenceMacro( OutputDirection, DirectionType );
162
165
167 void GenerateOutputInformation( void ) override;
168
171 void BeforeThreadedGenerateData( void ) override;
172
174 ModifiedTimeType GetMTime( void ) const override;
175
176protected:
177
180
181 void PrintSelf( std::ostream & os, Indent indent ) const override;
182
187 const OutputImageRegionType & outputRegionForThread,
188 ThreadIdType threadId ) override;
189
194 const OutputImageRegionType & outputRegionForThread,
195 ThreadIdType threadId );
196
200 void LinearGenerateData( void );
201
202private:
203
204 TransformToSpatialJacobianSource( const Self & ); // purposely not implemented
205 void operator=( const Self & ); // purposely not implemented
206
208 RegionType m_OutputRegion; // region of the output image
209 TransformPointerType m_Transform; // Coordinate transform to use
210 SpacingType m_OutputSpacing; // output image spacing
211 OriginType m_OutputOrigin; // output image origin
212 DirectionType m_OutputDirection; // output image direction cosines
213
214};
215
216} // end namespace itk
217
218#ifndef ITK_MANUAL_INSTANTIATION
219#include "itkTransformToSpatialJacobianSource.hxx"
220#endif
221
222#endif // end #ifndef __itkTransformToSpatialJacobianSource_h
Transform maps points, vectors and covariant vectors from an input space to an output space.
SmartPointer< const Self > ConstPointer
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Generate the spatial Jacobian matrix from a coordinate transform.
virtual void SetOutputOrigin(const double *values)
void GenerateOutputInformation(void) override
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
virtual void SetOutputSize(const SizeType &size)
ImageBase< itkGetStaticConstMacro(ImageDimension) > ImageBaseType
virtual void SetOutputSpacing(const double *values)
AdvancedTransform< TTransformPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > TransformType
ModifiedTimeType GetMTime(void) const override
virtual void SetOutputIndex(const IndexType &index)
void BeforeThreadedGenerateData(void) override
virtual const IndexType & GetOutputIndex()
itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension)
void PrintSelf(std::ostream &os, Indent indent) const override
TransformType::SpatialJacobianType SpatialJacobianType
void NonlinearThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
void SetOutputParametersFromImage(const ImageBaseType *image)
virtual const SizeType & GetOutputSize()


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo