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 #ifndef __itkTransformToSpatialJacobianSource_h
15 #define __itkTransformToSpatialJacobianSource_h
16 
17 #include "itkAdvancedTransform.h"
18 #include "itkImageSource.h"
19 
20 namespace itk
21 {
22 
61 template< class TOutputImage,
62 class TTransformPrecisionType = double >
64  public ImageSource< TOutputImage >
65 {
66 public:
67 
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:
173 
176 
177  void PrintSelf( std::ostream & os, Indent indent ) const;
178 
183  const OutputImageRegionType & outputRegionForThread,
184  ThreadIdType threadId );
185 
190  const OutputImageRegionType & outputRegionForThread,
191  ThreadIdType threadId );
192 
196  void LinearGenerateData( void );
197 
198 private:
199 
200  TransformToSpatialJacobianSource( const Self & ); // purposely not implemented
201  void operator=( const Self & ); // purposely not implemented
202 
204  RegionType m_OutputRegion; // region of the output image
205  TransformPointerType m_Transform; // Coordinate transform to use
206  SpacingType m_OutputSpacing; // output image spacing
207  OriginType m_OutputOrigin; // output image origin
208  DirectionType m_OutputDirection; // output image direction cosines
209 
210 };
211 
212 } // end namespace itk
213 
214 #ifndef ITK_MANUAL_INSTANTIATION
215 #include "itkTransformToSpatialJacobianSource.hxx"
216 #endif
217 
218 #endif // end #ifndef __itkTransformToSpatialJacobianSource_h
TransformType::SpatialJacobianType SpatialJacobianType
Matrix< ScalarType, OutputSpaceDimension, InputSpaceDimension > SpatialJacobianType
itkStaticConstMacro(ImageDimension, unsigned int, TOutputImage::ImageDimension)
Generate the spatial Jacobian matrix from a coordinate transform.
void SetOutputParametersFromImage(const ImageBaseType *image)
SmartPointer< const Self > ConstPointer
unsigned long GetMTime(void) const
void PrintSelf(std::ostream &os, Indent indent) const
virtual void SetOutputSize(const SizeType &size)
virtual const IndexType & GetOutputIndex()
virtual void SetOutputOrigin(OriginType _arg)
Transform maps points, vectors and covariant vectors from an input space to an output space...
virtual void BeforeThreadedGenerateData(void)
AdvancedTransform< TTransformPrecisionType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > TransformType
ImageBase< itkGetStaticConstMacro(ImageDimension) > ImageBaseType
void NonlinearThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId)
virtual const SizeType & GetOutputSize()
virtual void SetOutputIndex(const IndexType &index)
virtual void SetOutputSpacing(SpacingType _arg)
virtual void GenerateOutputInformation(void)


Generated on 11-03-2014 for elastix by doxygen 1.8.6 elastix logo