Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkAffineGeometryFrame.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkAffineGeometryFrame.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-04-07 14:33:52 $
00007   Version:   $Revision: 1.9 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkAffineGeometryFrame_h
00018 #define __itkAffineGeometryFrame_h
00019 
00020 #include "itkObject.h"
00021 #include "itkMacro.h"
00022 #include "itkScalableAffineTransform.h"
00023 #include "itkBoundingBox.h"
00024 
00025 namespace itk 
00026 {
00027 
00031 template <class TScalarType = double, unsigned int NDimensions = 3>
00032 class ITK_EXPORT AffineGeometryFrame : public Object
00033 {
00034 public:
00035   typedef AffineGeometryFrame       Self;
00036   typedef Object                    Superclass;
00037   typedef SmartPointer<Self>        Pointer;
00038   typedef SmartPointer<const Self>  ConstPointer;
00039 
00040   typedef ScalableAffineTransform<TScalarType, NDimensions>    TransformType;
00041   typedef BoundingBox<unsigned long, NDimensions, TScalarType> BoundingBoxType;
00042   typedef typename BoundingBoxType::BoundsArrayType            BoundsArrayType;
00043   typedef typename BoundingBoxType::Pointer                 BoundingBoxPointer;
00044 
00046   itkNewMacro(Self);
00047 
00049   itkTypeMacro(AffineGeometryFrame, Object);
00050 
00052   itkGetConstObjectMacro(BoundingBox, BoundingBoxType);
00053 
00054   const BoundsArrayType GetBounds() const
00055     {
00056     assert(m_BoundingBox.IsNotNull());
00057     return m_BoundingBox->GetBounds();
00058     }
00059 
00063   virtual void SetBounds(const BoundsArrayType& bounds);
00064 
00066   TScalarType GetExtent(unsigned int direction) const
00067     {
00068     assert(direction<NDimensions);
00069     assert(m_BoundingBox.IsNotNull());
00070     BoundsArrayType bounds = m_BoundingBox->GetBounds();
00071     return bounds[direction*2+1]-bounds[direction*2];
00072     }
00074 
00076   itkGetConstObjectMacro(IndexToObjectTransform, TransformType);
00077   itkGetObjectMacro(IndexToObjectTransform, TransformType);
00078   itkSetObjectMacro(IndexToObjectTransform, TransformType);
00080 
00082   itkGetConstObjectMacro(ObjectToNodeTransform, TransformType);
00083   itkGetObjectMacro(ObjectToNodeTransform, TransformType);
00084   itkSetObjectMacro(ObjectToNodeTransform, TransformType);
00086 
00088   itkGetConstObjectMacro(IndexToWorldTransform, TransformType);
00089   itkGetObjectMacro(IndexToWorldTransform, TransformType);
00090   itkSetObjectMacro(IndexToWorldTransform, TransformType);
00092 
00093 
00096   itkGetConstObjectMacro(IndexToNodeTransform, TransformType);
00097 
00099   virtual void Initialize();
00100 
00102   virtual Pointer Clone() const;
00103 
00104 protected:
00105 
00106   AffineGeometryFrame();
00107   virtual ~AffineGeometryFrame();
00108   void PrintSelf( std::ostream & os, Indent indent) const;
00109 
00111   virtual void InitializeGeometry(Self * newGeometry) const;
00112   void SetBoundsArray(const BoundsArrayType& bounds, 
00113                       BoundingBoxPointer& boundingBox);
00114   mutable BoundingBoxPointer m_BoundingBox;
00116 
00118   typename TransformType::Pointer m_IndexToObjectTransform;
00119   typename TransformType::Pointer m_ObjectToNodeTransform;
00120   typename TransformType::Pointer m_IndexToNodeTransform;
00121   typename TransformType::Pointer m_IndexToWorldTransform;
00122 
00123 private:
00124   AffineGeometryFrame(const Self&); //purposely not implemented
00125   void operator=(const Self&); //purposely not implemented
00126 
00127 };
00128 
00129 } // namespace itk
00130 
00131 
00132 #ifndef ITK_MANUAL_INSTANTIATION
00133 #include "itkAffineGeometryFrame.txx"
00134 #endif
00135 
00136 
00137 #endif /* __itkAffineGeometryFrame_h */
00138 

Generated at Fri Apr 16 17:46:09 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000