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     }
00073 
00075   itkGetConstObjectMacro(IndexToObjectTransform, TransformType);
00076   itkGetObjectMacro(IndexToObjectTransform, TransformType);
00077   itkSetObjectMacro(IndexToObjectTransform, TransformType);
00079 
00081   itkGetConstObjectMacro(ObjectToNodeTransform, TransformType);
00082   itkGetObjectMacro(ObjectToNodeTransform, TransformType);
00083   itkSetObjectMacro(ObjectToNodeTransform, TransformType);
00085 
00087   itkGetConstObjectMacro(IndexToWorldTransform, TransformType);
00088   itkGetObjectMacro(IndexToWorldTransform, TransformType);
00089   itkSetObjectMacro(IndexToWorldTransform, TransformType);
00091 
00092 
00095   itkGetConstObjectMacro(IndexToNodeTransform, TransformType);
00096 
00098   virtual void Initialize();
00099 
00101   virtual Pointer Clone() const;
00102 
00103 protected:
00104 
00105   AffineGeometryFrame();
00106   virtual ~AffineGeometryFrame();
00107 
00109   virtual void InitializeGeometry(Self * newGeometry) const;
00110   void SetBoundsArray(const BoundsArrayType& bounds, BoundingBoxPointer& boundingBox);
00111   mutable BoundingBoxPointer m_BoundingBox;
00113 
00115   typename TransformType::Pointer m_IndexToObjectTransform;
00116   typename TransformType::Pointer m_ObjectToNodeTransform;
00117   typename TransformType::Pointer m_IndexToNodeTransform;
00118   typename TransformType::Pointer m_IndexToWorldTransform;
00119 };
00120 
00121 } // namespace itk
00122 
00123 
00124 #ifndef ITK_MANUAL_INSTANTIATION
00125 #include "itkAffineGeometryFrame.txx"
00126 #endif
00127 
00128 
00129 #endif /* __itkAffineGeometryFrame_h */
00130 

Generated at Sat Sep 2 20:06:22 2006 for ITK by doxygen 1.4.7 written by Dimitri van Heesch, © 1997-2000