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.
00001 /*======================================================================
00002 
00003 This file is part of the elastix software.
00004 
00005 Copyright (c) University Medical Center Utrecht. All rights reserved.
00006 See src/CopyrightElastix.txt or http://elastix.isi.uu.nl/legal.php for
00007 details.
00008 
00009 This software is distributed WITHOUT ANY WARRANTY; without even
00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011 PURPOSE. See the above copyright notices for more information.
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   //typedef typename PixelType::ValueType           PixelValueType;
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& ); //purposely not implemented
00200   void operator=( const Self& ); //purposely not implemented
00201 
00203   RegionType              m_OutputRegion;      // region of the output image
00204   TransformPointerType    m_Transform;         // Coordinate transform to use
00205   SpacingType             m_OutputSpacing;     // output image spacing
00206   OriginType              m_OutputOrigin;      // output image origin
00207   DirectionType           m_OutputDirection;   // output image direction cosines
00208 
00209 }; // end class TransformToSpatialJacobianSource
00210 
00211 } // end namespace itk
00212 
00213 #ifndef ITK_MANUAL_INSTANTIATION
00214 #include "itkTransformToSpatialJacobianSource.txx"
00215 #endif
00216 
00217 #endif // end #ifndef __itkTransformToSpatialJacobianSource_h


Generated on 11-05-2012 for elastix by doxygen 1.7.6.1 elastix logo