go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkTransformToDeterminantOfSpatialJacobianSource.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/*=========================================================================
19
20 Program: Insight Segmentation & Registration Toolkit
21 Module: $RCSfile: itkTransformToDeterminantOfSpatialJacobianSource.h,v $
22 Language: C++
23 Date: $Date: 2008-08-01 13:42:00 $
24 Version: $Revision: 1.3 $
25
26 Copyright (c) Insight Software Consortium. All rights reserved.
27 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
28
29 This software is distributed WITHOUT ANY WARRANTY; without even
30 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
31 PURPOSE. See the above copyright notices for more information.
32
33=========================================================================*/
34#ifndef __itkTransformToDeterminantOfSpatialJacobianSource_h
35#define __itkTransformToDeterminantOfSpatialJacobianSource_h
36
38#include "itkImageSource.h"
39
40namespace itk
41{
42
73template< class TOutputImage,
74class TTransformPrecisionType = double >
76 public ImageSource< TOutputImage >
77{
78public:
79
82 typedef ImageSource< TOutputImage > Superclass;
84 typedef SmartPointer< const Self > ConstPointer;
85
86 typedef TOutputImage OutputImageType;
87 typedef typename OutputImageType::Pointer OutputImagePointer;
88 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
89 typedef typename OutputImageType::RegionType OutputImageRegionType;
90
92 itkNewMacro( Self );
93
96
98 itkStaticConstMacro( ImageDimension, unsigned int,
99 TOutputImage::ImageDimension );
100
102 typedef AdvancedTransform< TTransformPrecisionType,
103 itkGetStaticConstMacro( ImageDimension ),
104 itkGetStaticConstMacro( ImageDimension ) > TransformType;
107
109 typedef typename OutputImageType::PixelType PixelType;
110 //typedef typename PixelType::ValueType PixelValueType;
111 typedef typename OutputImageType::RegionType RegionType;
112 typedef typename RegionType::SizeType SizeType;
113 typedef typename OutputImageType::IndexType IndexType;
114 typedef typename OutputImageType::PointType PointType;
115 typedef typename OutputImageType::SpacingType SpacingType;
116 typedef typename OutputImageType::PointType OriginType;
117 typedef typename OutputImageType::DirectionType DirectionType;
118
120 typedef ImageBase< itkGetStaticConstMacro( ImageDimension ) > ImageBaseType;
121
129 itkSetConstObjectMacro( Transform, TransformType );
130
132 itkGetConstObjectMacro( Transform, TransformType );
133
135 virtual void SetOutputSize( const SizeType & size );
136
138 virtual const SizeType & GetOutputSize();
139
142 virtual void SetOutputIndex( const IndexType & index );
143
145 virtual const IndexType & GetOutputIndex();
146
148 itkSetMacro( OutputRegion, OutputImageRegionType );
149
151 itkGetConstReferenceMacro( OutputRegion, OutputImageRegionType );
152
154 itkSetMacro( OutputSpacing, SpacingType );
155 virtual void SetOutputSpacing( const double * values );
156
158 itkGetConstReferenceMacro( OutputSpacing, SpacingType );
159
161 itkSetMacro( OutputOrigin, OriginType );
162 virtual void SetOutputOrigin( const double * values );
163
165 itkGetConstReferenceMacro( OutputOrigin, OriginType );
166
168 itkSetMacro( OutputDirection, DirectionType );
169 itkGetConstReferenceMacro( OutputDirection, DirectionType );
170
173
175 void GenerateOutputInformation( void ) override;
176
179 void BeforeThreadedGenerateData( void ) override;
180
182 ModifiedTimeType GetMTime( void ) const override;
183
184protected:
185
188
189 void PrintSelf( std::ostream & os, Indent indent ) const override;
190
195 const OutputImageRegionType & outputRegionForThread,
196 ThreadIdType threadId ) override;
197
202 const OutputImageRegionType & outputRegionForThread,
203 ThreadIdType threadId );
204
207 void LinearGenerateData( void );
208
209private:
210
211 TransformToDeterminantOfSpatialJacobianSource( const Self & ); // purposely not implemented
212 void operator=( const Self & ); // purposely not implemented
213
215 RegionType m_OutputRegion; // region of the output image
216 TransformPointerType m_Transform; // Coordinate transform to use
217 SpacingType m_OutputSpacing; // output image spacing
218 OriginType m_OutputOrigin; // output image origin
219 DirectionType m_OutputDirection; // output image direction cosines
220
221};
222
223} // end namespace itk
224
225#ifndef ITK_MANUAL_INSTANTIATION
226#include "itkTransformToDeterminantOfSpatialJacobianSource.hxx"
227#endif
228
229#endif // end #ifndef __itkTransformToDeterminantOfSpatialJacobianSource_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 from a coordinate transform.
virtual void SetOutputSpacing(const double *values)
virtual void SetOutputIndex(const IndexType &index)
itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension)
void PrintSelf(std::ostream &os, Indent indent) const override
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
void NonlinearThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
AdvancedTransform< TTransformPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > TransformType
virtual void SetOutputOrigin(const double *values)
virtual void SetOutputSize(const SizeType &size)
void SetOutputParametersFromImage(const ImageBaseType *image)
ModifiedTimeType GetMTime(void) const override


Generated on 1667476801 for elastix by doxygen 1.9.4 elastix logo