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: 2005/03/09 16:46:14 $
00007   Version:   $Revision: 1.4 $
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 AffineGeometryFrame : public itk::Object
00033 {
00034 public:
00035   typedef AffineGeometryFrame       Self;
00036   typedef itk::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 
00062   virtual void SetBounds(const BoundsArrayType& bounds);
00063 
00065   TScalarType GetExtent(unsigned int direction) const
00066     {
00067     assert(direction<NDimensions);
00068     assert(m_BoundingBox.IsNotNull());
00069     BoundsArrayType bounds = m_BoundingBox->GetBounds();
00070     return bounds[direction*2+1]-bounds[direction*2];
00071     }
00072 
00074   itkGetConstObjectMacro(IndexToObjectTransform, TransformType);
00075   itkGetObjectMacro(IndexToObjectTransform, TransformType);
00076   itkSetObjectMacro(IndexToObjectTransform, TransformType);
00077   
00079   itkGetConstObjectMacro(ObjectToNodeTransform, TransformType);
00080   itkGetObjectMacro(ObjectToNodeTransform, TransformType);
00081   itkSetObjectMacro(ObjectToNodeTransform, TransformType);
00082 
00084   itkGetConstObjectMacro(IndexToWorldTransform, TransformType);
00085   itkGetObjectMacro(IndexToWorldTransform, TransformType);
00086   itkSetObjectMacro(IndexToWorldTransform, TransformType);
00087 
00088 
00091   itkGetConstObjectMacro(IndexToNodeTransform, TransformType);
00092   
00094   virtual void Initialize();
00095 
00097   virtual Pointer Clone() const;
00098 
00099 protected:
00100 
00101   AffineGeometryFrame();
00102   virtual ~AffineGeometryFrame();
00103 
00105   virtual void InitializeGeometry(Self * newGeometry) const;
00106   void SetBoundsArray(const BoundsArrayType& bounds, BoundingBoxPointer& boundingBox);
00107   mutable BoundingBoxPointer m_BoundingBox;
00108 
00110   typename TransformType::Pointer m_IndexToObjectTransform;
00111   typename TransformType::Pointer m_ObjectToNodeTransform;
00112   typename TransformType::Pointer m_IndexToNodeTransform;
00113   typename TransformType::Pointer m_IndexToWorldTransform;
00114 };
00115 
00116 } // namespace itk
00117 
00118 
00119 #ifndef ITK_MANUAL_INSTANTIATION
00120 #include "itkAffineGeometryFrame.txx"
00121 #endif
00122 
00123 
00124 #endif /* __itkAffineGeometryFrame_h */

Generated at Wed May 24 22:45:13 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000