ITK  4.9.0
Insight Segmentation and Registration Toolkit
itkAffineGeometryFrame.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkAffineGeometryFrame_h
19 #define itkAffineGeometryFrame_h
20 
21 #include "itkObject.h"
22 #include "itkMacro.h"
24 #include "itkBoundingBox.h"
25 
26 namespace itk
27 {
32 template< typename TScalar = double, unsigned int NDimensions = 3 >
34 {
35 public:
37  typedef Object Superclass;
40 
45 
47  itkNewMacro(Self);
48 
50  itkTypeMacro(AffineGeometryFrame, Object);
51 
53  itkGetModifiableObjectMacro(BoundingBox, BoundingBoxType);
54 
55  const BoundsArrayType GetBounds() const
56  {
57  itkAssertInDebugAndIgnoreInReleaseMacro( m_BoundingBox.IsNotNull() );
58  return m_BoundingBox->GetBounds();
59  }
60 
64  virtual void SetBounds(const BoundsArrayType & bounds);
65 
67  TScalar GetExtent(unsigned int direction) const
68  {
69  itkAssertInDebugAndIgnoreInReleaseMacro(direction < NDimensions);
70  itkAssertInDebugAndIgnoreInReleaseMacro( m_BoundingBox.IsNotNull() );
71  BoundsArrayType bounds = m_BoundingBox->GetBounds();
72  return bounds[direction * 2 + 1] - bounds[direction * 2];
73  }
75 
77  itkSetObjectMacro(IndexToObjectTransform, TransformType);
78  itkGetModifiableObjectMacro(IndexToObjectTransform, TransformType);
80 
82  itkSetObjectMacro(ObjectToNodeTransform, TransformType);
83  itkGetModifiableObjectMacro(ObjectToNodeTransform, TransformType);
85 
87  itkSetObjectMacro(IndexToWorldTransform, TransformType);
88  itkGetModifiableObjectMacro(IndexToWorldTransform, TransformType);
90 
93  itkGetModifiableObjectMacro(IndexToNodeTransform, TransformType);
94 
96  virtual void Initialize();
97 
99  virtual LightObject::Pointer InternalClone() const ITK_OVERRIDE;
100 
101 protected:
102 
104  virtual ~AffineGeometryFrame();
105  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
106 
108  virtual void InitializeGeometry(Self *newGeometry) const;
109 
110  void SetBoundsArray(const BoundsArrayType & bounds,
111  BoundingBoxPointer & boundingBox);
112 
114 
120 
121 private:
122  AffineGeometryFrame(const Self &) ITK_DELETE_FUNCTION;
123  void operator=(const Self &) ITK_DELETE_FUNCTION;
124 };
125 } // namespace itk
126 
127 #ifndef ITK_MANUAL_INSTANTIATION
128 #include "itkAffineGeometryFrame.hxx"
129 #endif
130 
131 #endif /* itkAffineGeometryFrame_h */
virtual void Initialize()
TransformType::Pointer m_IndexToWorldTransform
Light weight base class for most itk classes.
virtual void SetBounds(const BoundsArrayType &bounds)
TScalar GetExtent(unsigned int direction) const
TransformType::Pointer m_IndexToObjectTransform
virtual LightObject::Pointer InternalClone() const override
BoundingBoxType::Pointer BoundingBoxPointer
bool IsNotNull() const
TransformType::Pointer m_IndexToNodeTransform
virtual void PrintSelf(std::ostream &os, Indent indent) const override
virtual void InitializeGeometry(Self *newGeometry) const
ScalableAffineTransform< TScalar, NDimensions > TransformType
void SetBoundsArray(const BoundsArrayType &bounds, BoundingBoxPointer &boundingBox)
SmartPointer< const Self > ConstPointer
BoundingBoxType::BoundsArrayType BoundsArrayType
TransformType::Pointer m_ObjectToNodeTransform
Control indentation during Print() invocation.
Definition: itkIndent.h:49
const BoundsArrayType GetBounds() const
Describes the geometry of a data object.
Base class for most ITK classes.
Definition: itkObject.h:57
Affine transformation with a specified center of rotation.
Represent and compute information about bounding boxes.
SmartPointer< Self > Pointer
BoundingBox< IdentifierType, NDimensions, TScalar > BoundingBoxType