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 This file is part of the elastix software.
4 
5 Copyright (c) University Medical Center Utrecht. All rights reserved.
6 See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
7 details.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notices for more information.
12 
13 ======================================================================*/
14 
15 #ifndef __itkTransformToSpatialJacobianSource_h
16 #define __itkTransformToSpatialJacobianSource_h
17 
18 #include "itkAdvancedTransform.h"
19 #include "itkImageSource.h"
20 
21 namespace itk
22 {
23 
62 template <class TOutputImage,
63 class TTransformPrecisionType=double>
65  public ImageSource<TOutputImage>
66 {
67 public:
71  typedef SmartPointer<Self> Pointer;
72  typedef SmartPointer<const Self> ConstPointer;
73 
74  typedef TOutputImage OutputImageType;
75  typedef typename OutputImageType::Pointer OutputImagePointer;
76  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
77  typedef typename OutputImageType::RegionType OutputImageRegionType;
78 
80  itkNewMacro( Self );
81 
84 
86  itkStaticConstMacro( ImageDimension, unsigned int,
87  TOutputImage::ImageDimension );
88 
90  typedef AdvancedTransform<TTransformPrecisionType,
91  itkGetStaticConstMacro( ImageDimension ),
92  itkGetStaticConstMacro( ImageDimension )> TransformType;
95 
97  typedef typename OutputImageType::PixelType PixelType;
98  //typedef typename PixelType::ValueType PixelValueType;
99  typedef typename OutputImageType::RegionType RegionType;
100  typedef typename RegionType::SizeType SizeType;
101  typedef typename OutputImageType::IndexType IndexType;
102  typedef typename OutputImageType::PointType PointType;
103  typedef typename OutputImageType::SpacingType SpacingType;
104  typedef typename OutputImageType::PointType OriginType;
105  typedef typename OutputImageType::DirectionType DirectionType;
106 
108  typedef ImageBase< itkGetStaticConstMacro( ImageDimension ) > ImageBaseType;
109 
117  itkSetConstObjectMacro( Transform, TransformType );
118 
120  itkGetConstObjectMacro( Transform, TransformType );
121 
123  virtual void SetOutputSize( const SizeType & size );
124 
126  virtual const SizeType & GetOutputSize();
127 
130  virtual void SetOutputIndex( const IndexType & index );
131 
133  virtual const IndexType & GetOutputIndex();
134 
136  itkSetMacro( OutputRegion, OutputImageRegionType );
137 
139  itkGetConstReferenceMacro( OutputRegion, OutputImageRegionType );
140 
142  itkSetMacro( OutputSpacing, SpacingType );
143  virtual void SetOutputSpacing( const double* values );
144 
146  itkGetConstReferenceMacro( OutputSpacing, SpacingType );
147 
149  itkSetMacro( OutputOrigin, OriginType );
150  virtual void SetOutputOrigin( const double* values);
151 
153  itkGetConstReferenceMacro( OutputOrigin, OriginType );
154 
156  itkSetMacro( OutputDirection, DirectionType );
157  itkGetConstReferenceMacro( OutputDirection, DirectionType );
158 
160  void SetOutputParametersFromImage( const ImageBaseType * image );
161 
163  virtual void GenerateOutputInformation( void );
164 
167  virtual void BeforeThreadedGenerateData( void );
168 
170  unsigned long GetMTime( void ) const;
171 
172 protected:
175 
176  void PrintSelf( std::ostream& os, Indent indent ) const;
177 
181  void ThreadedGenerateData(
182  const OutputImageRegionType & outputRegionForThread,
183  int threadId );
184 
188  void NonlinearThreadedGenerateData(
189  const OutputImageRegionType& outputRegionForThread,
190  int threadId );
191 
195  void LinearGenerateData( void );
196 
197 private:
198 
199  TransformToSpatialJacobianSource( const Self& ); //purposely not implemented
200  void operator=( const Self& ); //purposely not implemented
201 
203  RegionType m_OutputRegion; // region of the output image
204  TransformPointerType m_Transform; // Coordinate transform to use
205  SpacingType m_OutputSpacing; // output image spacing
206  OriginType m_OutputOrigin; // output image origin
207  DirectionType m_OutputDirection; // output image direction cosines
208 
209 }; // end class TransformToSpatialJacobianSource
210 
211 } // end namespace itk
212 
213 #ifndef ITK_MANUAL_INSTANTIATION
214 #include "itkTransformToSpatialJacobianSource.txx"
215 #endif
216 
217 #endif // end #ifndef __itkTransformToSpatialJacobianSource_h
TransformType::SpatialJacobianType SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
Generate the spatial Jacobian matrix from a coordinate transform.
SmartPointer< const Self > ConstPointer
Transform maps points, vectors and covariant vectors from an input space to an output space...
AdvancedTransform< TTransformPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension)> TransformType
ImageBase< itkGetStaticConstMacro(ImageDimension) > ImageBaseType


Generated on 05-12-2013 for elastix by doxygen 1.8.5 elastix logo