itkAffineGeometryFrame.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
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
00110 virtual void InitializeGeometry(Self * newGeometry) const;
00111 void SetBoundsArray(const BoundsArrayType& bounds,
00112 BoundingBoxPointer& boundingBox);
00113 mutable BoundingBoxPointer m_BoundingBox;
00115
00117 typename TransformType::Pointer m_IndexToObjectTransform;
00118 typename TransformType::Pointer m_ObjectToNodeTransform;
00119 typename TransformType::Pointer m_IndexToNodeTransform;
00120 typename TransformType::Pointer m_IndexToWorldTransform;
00121
00122 private:
00123 AffineGeometryFrame(const Self&);
00124 void operator=(const Self&);
00125
00126 };
00127
00128 }
00129
00130
00131 #ifndef ITK_MANUAL_INSTANTIATION
00132 #include "itkAffineGeometryFrame.txx"
00133 #endif
00134
00135
00136 #endif
00137