Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __itkTransformToSpatialJacobianSource_h
00016 #define __itkTransformToSpatialJacobianSource_h
00017
00018 #include "itkAdvancedTransform.h"
00019 #include "itkImageSource.h"
00020
00021 namespace itk
00022 {
00023
00062 template <class TOutputImage,
00063 class TTransformPrecisionType=double>
00064 class ITK_EXPORT TransformToSpatialJacobianSource:
00065 public ImageSource<TOutputImage>
00066 {
00067 public:
00069 typedef TransformToSpatialJacobianSource Self;
00070 typedef ImageSource<TOutputImage> Superclass;
00071 typedef SmartPointer<Self> Pointer;
00072 typedef SmartPointer<const Self> ConstPointer;
00073
00074 typedef TOutputImage OutputImageType;
00075 typedef typename OutputImageType::Pointer OutputImagePointer;
00076 typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
00077 typedef typename OutputImageType::RegionType OutputImageRegionType;
00078
00080 itkNewMacro( Self );
00081
00083 itkTypeMacro( TransformToSpatialJacobianSource, ImageSource );
00084
00086 itkStaticConstMacro( ImageDimension, unsigned int,
00087 TOutputImage::ImageDimension );
00088
00090 typedef AdvancedTransform<TTransformPrecisionType,
00091 itkGetStaticConstMacro( ImageDimension ),
00092 itkGetStaticConstMacro( ImageDimension )> TransformType;
00093 typedef typename TransformType::ConstPointer TransformPointerType;
00094 typedef typename TransformType::SpatialJacobianType SpatialJacobianType;
00095
00097 typedef typename OutputImageType::PixelType PixelType;
00098
00099 typedef typename OutputImageType::RegionType RegionType;
00100 typedef typename RegionType::SizeType SizeType;
00101 typedef typename OutputImageType::IndexType IndexType;
00102 typedef typename OutputImageType::PointType PointType;
00103 typedef typename OutputImageType::SpacingType SpacingType;
00104 typedef typename OutputImageType::PointType OriginType;
00105 typedef typename OutputImageType::DirectionType DirectionType;
00106
00108 typedef ImageBase< itkGetStaticConstMacro( ImageDimension ) > ImageBaseType;
00109
00117 itkSetConstObjectMacro( Transform, TransformType );
00118
00120 itkGetConstObjectMacro( Transform, TransformType );
00121
00123 virtual void SetOutputSize( const SizeType & size );
00124
00126 virtual const SizeType & GetOutputSize();
00127
00130 virtual void SetOutputIndex( const IndexType & index );
00131
00133 virtual const IndexType & GetOutputIndex();
00134
00136 itkSetMacro( OutputRegion, OutputImageRegionType );
00137
00139 itkGetConstReferenceMacro( OutputRegion, OutputImageRegionType );
00140
00142 itkSetMacro( OutputSpacing, SpacingType );
00143 virtual void SetOutputSpacing( const double* values );
00144
00146 itkGetConstReferenceMacro( OutputSpacing, SpacingType );
00147
00149 itkSetMacro( OutputOrigin, OriginType );
00150 virtual void SetOutputOrigin( const double* values);
00151
00153 itkGetConstReferenceMacro( OutputOrigin, OriginType );
00154
00156 itkSetMacro( OutputDirection, DirectionType );
00157 itkGetConstReferenceMacro( OutputDirection, DirectionType );
00158
00160 void SetOutputParametersFromImage( const ImageBaseType * image );
00161
00163 virtual void GenerateOutputInformation( void );
00164
00167 virtual void BeforeThreadedGenerateData( void );
00168
00170 unsigned long GetMTime( void ) const;
00171
00172 protected:
00173 TransformToSpatialJacobianSource();
00174 ~TransformToSpatialJacobianSource() {};
00175
00176 void PrintSelf( std::ostream& os, Indent indent ) const;
00177
00181 void ThreadedGenerateData(
00182 const OutputImageRegionType & outputRegionForThread,
00183 int threadId );
00184
00188 void NonlinearThreadedGenerateData(
00189 const OutputImageRegionType& outputRegionForThread,
00190 int threadId );
00191
00195 void LinearGenerateData( void );
00196
00197 private:
00198
00199 TransformToSpatialJacobianSource( const Self& );
00200 void operator=( const Self& );
00201
00203 RegionType m_OutputRegion;
00204 TransformPointerType m_Transform;
00205 SpacingType m_OutputSpacing;
00206 OriginType m_OutputOrigin;
00207 DirectionType m_OutputDirection;
00208
00209 };
00210
00211 }
00212
00213 #ifndef ITK_MANUAL_INSTANTIATION
00214 #include "itkTransformToSpatialJacobianSource.txx"
00215 #endif
00216
00217 #endif // end #ifndef __itkTransformToSpatialJacobianSource_h