ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkTubeSpatialObject.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 itkTubeSpatialObject_h
19 #define itkTubeSpatialObject_h
20 
21 #include <list>
22 
25 
26 namespace itk
27 {
41 template< unsigned int TDimension = 3,
42  class TSpatialObjectPointType = TubeSpatialObjectPoint< TDimension > >
43 class ITK_TEMPLATE_EXPORT TubeSpatialObject:
44  public PointBasedSpatialObject< TDimension, TSpatialObjectPointType >
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(TubeSpatialObject);
48 
50  using Superclass = PointBasedSpatialObject< TDimension,
51  TSpatialObjectPointType >;
54 
55  using ScalarType = double;
56 
57  using TubePointType = TSpatialObjectPointType;
58  using TubePointListType = std::vector< TubePointType >;
59 
60  using PointType = typename Superclass::PointType;
61  using TransformType = typename Superclass::TransformType;
62  using SpatialObjectPointType = typename Superclass::SpatialObjectPointType;
66  using CovariantVectorType = typename Superclass::CovariantVectorType;
67  using BoundingBoxType = typename Superclass::BoundingBoxType;
68 
70  itkNewMacro(Self);
71 
74 
76  itkSetMacro(EndRounded, bool);
77  itkGetConstMacro(EndRounded, bool);
79 
81  bool ComputeTangentAndNormals();
82 
84  unsigned int RemoveDuplicatePointsInObjectSpace(
85  double minSpacingInObjectSpace = 0 );
86 
89  itkSetMacro(ParentPoint, int);
90 
93  itkGetConstMacro(ParentPoint, int);
94 
97  itkSetMacro(Root, bool);
98 
101  itkGetConstMacro(Root, bool);
102 
104  bool ComputeMyBoundingBox() const override;
105 
107  bool IsInsideInObjectSpace(const PointType & point, unsigned int depth = 0,
108  const std::string & name = "") const override;
109 
110 protected:
112  ~TubeSpatialObject() override = default;
113 
115  void PrintSelf(std::ostream & os, Indent indent) const override;
116 
117  typename LightObject::Pointer InternalClone() const override;
118 
119 private:
122  bool m_Root;
123 
124 };
125 
126 } // end namespace itk
127 
128 #ifndef ITK_MANUAL_INSTANTIATION
129 #include "itkTubeSpatialObject.hxx"
130 #endif
131 
132 #endif // itkTubeSpatialObject_h
This class serves as the base class for point-based spatial objects.
Point used for a tube definition.
Define a front-end to the STL &quot;vector&quot; container that conforms to the IndexedContainerInterface.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Representation of a tube based on the spatial object classes.
Base class for most ITK classes.
Definition: itkObject.h:60
Base class for all data objects in ITK.