ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkSpatialObjectTreeNode.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 itkSpatialObjectTreeNode_h
19 #define itkSpatialObjectTreeNode_h
20 
21 #include "itkTreeNode.h"
22 #include "itkSpatialObject.h"
23 
24 namespace itk
25 {
26 
27 // Forward reference because of circular dependencies
28 template< unsigned int VDimension >
29 class ITK_FORWARD_EXPORT SpatialObject;
30 
35 template< unsigned int TDimension >
36 class ITK_TEMPLATE_EXPORT SpatialObjectTreeNode:public TreeNode< SpatialObject< TDimension > * >
37 {
38 public:
39 
49  typedef typename Superclass::ChildrenListType ChildrenListType;
50 
52  itkNewMacro(Self);
53 
55  itkTypeMacro(SpatialObjectTreeNode, TreeNode);
56 
58  virtual void SetData(SpatialObjectType *data);
59 
61  itkSetObjectMacro(NodeToParentNodeTransform, TransformType);
62  itkGetConstReferenceObjectMacro(NodeToParentNodeTransform, TransformType);
64 
66  itkSetObjectMacro(NodeToWorldTransform, TransformType);
67  itkGetConstReferenceObjectMacro(NodeToWorldTransform, TransformType);
69 
71  void ComputeNodeToWorldTransform();
72 
74 #if !defined( ITK_WRAPPING_PARSER )
75  virtual ChildrenListType * GetChildren(unsigned int depth = 0,
76  char *name = ITK_NULLPTR) const ITK_OVERRIDE;
77 
78 #endif
79 
80 protected:
81 
84  virtual ~SpatialObjectTreeNode() ITK_OVERRIDE {}
85  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
87 
90 
91 private:
92 
93  ITK_DISALLOW_COPY_AND_ASSIGN(SpatialObjectTreeNode);
94 };
95 
96 } // end namespace itk
97 
98 #ifndef ITK_MANUAL_INSTANTIATION
99 #include "itkSpatialObjectTreeNode.hxx"
100 #endif
101 
102 #endif
virtual ~SpatialObjectTreeNode() override
Light weight base class for most itk classes.
Represents a node in a tree.
Definition: itkTreeNode.h:43
SpatialObjectTreeNode< TDimension > Self
class ITK_FORWARD_EXPORT SpatialObject
SmartPointer< const Self > ConstPointer
class ITK_FORWARD_EXPORT SpatialObjectTreeNode
TreeNode< SpatialObject< TDimension > * > Superclass
Superclass::ChildrenListType ChildrenListType
TransformPointer m_NodeToParentNodeTransform
const TransformType * TransformConstPointer
TransformType::Pointer TransformPointer
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ScalableAffineTransform< double, TDimension > TransformType
Affine transformation with a specified center of rotation.
SpatialObject< TDimension > SpatialObjectType