ITK  5.2.0
Insight Toolkit
itkTubeSpatialObject.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 itkTubeSpatialObject_h
19 #define itkTubeSpatialObject_h
20 
21 #include <list>
22 
25 
26 namespace itk
27 {
41 template <unsigned int TDimension = 3, class TSpatialObjectPointType = TubeSpatialObjectPoint<TDimension>>
42 class ITK_TEMPLATE_EXPORT TubeSpatialObject : public PointBasedSpatialObject<TDimension, TSpatialObjectPointType>
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_MOVE(TubeSpatialObject);
46 
51 
52  using ScalarType = double;
53 
54  using TubePointType = TSpatialObjectPointType;
55  using TubePointListType = std::vector<TubePointType>;
56 
57  using PointType = typename Superclass::PointType;
58  using TransformType = typename Superclass::TransformType;
59  using SpatialObjectPointType = typename Superclass::SpatialObjectPointType;
63  using CovariantVectorType = typename Superclass::CovariantVectorType;
64  using BoundingBoxType = typename Superclass::BoundingBoxType;
65 
67  itkNewMacro(Self);
68 
71 
74  void
75  Clear() override;
76 
78  itkSetMacro(EndRounded, bool);
79  itkGetConstMacro(EndRounded, bool);
80  itkBooleanMacro(EndRounded);
82 
84  bool
85  ComputeTangentsAndNormals();
86 
87 #if !defined(ITK_LEGACY_REMOVE)
88 
89  itkLegacyMacro(bool ComputeTangentAndNormals()) { return ComputeTangentsAndNormals(); }
90 #endif
91 
93  unsigned int
94  RemoveDuplicatePointsInObjectSpace(double minSpacingInObjectSpace = 0);
95 
98  itkSetMacro(ParentPoint, int);
99 
102  itkGetConstMacro(ParentPoint, int);
103 
106  itkSetMacro(Root, bool);
107 
110  itkGetConstMacro(Root, bool);
111 
112  itkBooleanMacro(Root);
113 
115  bool
116  IsInsideInObjectSpace(const PointType & point) const override;
117 
118  /* Avoid hiding the overload that supports depth and name arguments */
119  using Superclass::IsInsideInObjectSpace;
120 
121 protected:
123  void
124  ComputeMyBoundingBox() override;
125 
127  ~TubeSpatialObject() override = default;
128 
130  void
131  PrintSelf(std::ostream & os, Indent indent) const override;
132 
133  typename LightObject::Pointer
134  InternalClone() const override;
135 
136 private:
139  bool m_Root;
140 };
141 
142 } // end namespace itk
143 
144 #ifndef ITK_MANUAL_INSTANTIATION
145 # include "itkTubeSpatialObject.hxx"
146 #endif
147 
148 #endif // itkTubeSpatialObject_h
itk::DTITubeSpatialObjectPoint
Point used for a tube definition.
Definition: itkDTITubeSpatialObjectPoint.h:61
itk::PointBasedSpatialObject
This class serves as the base class for point-based spatial objects.
Definition: itkPointBasedSpatialObject.h:37
itk::PointBasedSpatialObject< TDimension, DTITubeSpatialObjectPoint< TDimension > >::VectorType
typename Superclass::VectorType VectorType
Definition: itkPointBasedSpatialObject.h:54
itk::PointBasedSpatialObject< TDimension, DTITubeSpatialObjectPoint< TDimension > >::ScalarType
double ScalarType
Definition: itkPointBasedSpatialObject.h:47
itk::TubeSpatialObject
Representation of a tube based on the spatial object classes.
Definition: itkTubeSpatialObject.h:42
itk::GTest::TypedefsAndConstructors::Dimension2::VectorType
ImageBaseType::SpacingType VectorType
Definition: itkGTestTypedefsAndConstructors.h:53
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::PointBasedSpatialObject< TDimension, DTITubeSpatialObjectPoint< TDimension > >::PointType
typename Superclass::PointType PointType
Definition: itkPointBasedSpatialObject.h:52
itk::PointBasedSpatialObject< TDimension, DTITubeSpatialObjectPoint< TDimension > >::BoundingBoxType
typename Superclass::BoundingBoxType BoundingBoxType
Definition: itkPointBasedSpatialObject.h:56
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::TubeSpatialObject< TDimension, DTITubeSpatialObjectPoint< TDimension > >::TubePointListType
std::vector< TubePointType > TubePointListType
Definition: itkTubeSpatialObject.h:55
itk::PointBasedSpatialObject< TDimension, DTITubeSpatialObjectPoint< TDimension > >::CovariantVectorType
typename Superclass::CovariantVectorType CovariantVectorType
Definition: itkPointBasedSpatialObject.h:55
itk::TubeSpatialObject::m_ParentPoint
int m_ParentPoint
Definition: itkTubeSpatialObject.h:137
itk::TubeSpatialObject::m_Root
bool m_Root
Definition: itkTubeSpatialObject.h:139
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkTubeSpatialObjectPoint.h
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itkPointBasedSpatialObject.h
itk::TubeSpatialObject::m_EndRounded
bool m_EndRounded
Definition: itkTubeSpatialObject.h:138
itk::PointBasedSpatialObject< TDimension, DTITubeSpatialObjectPoint< TDimension > >::TransformType
typename Superclass::TransformType TransformType
Definition: itkPointBasedSpatialObject.h:53
itk::VectorContainer
Define a front-end to the STL "vector" container that conforms to the IndexedContainerInterface.
Definition: itkVectorContainer.h:48
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293