ITK  5.2.0
Insight Toolkit
itkArrowSpatialObject.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 itkArrowSpatialObject_h
19 #define itkArrowSpatialObject_h
20 
21 #include "itkSpatialObject.h"
22 
23 namespace itk
24 {
36 template <unsigned int TDimension = 3>
37 class ITK_TEMPLATE_EXPORT ArrowSpatialObject : public SpatialObject<TDimension>
38 {
39 public:
40  ITK_DISALLOW_COPY_AND_MOVE(ArrowSpatialObject);
41 
46  using ScalarType = double;
49  using TransformType = typename Superclass::TransformType;
50  using MatrixType = typename TransformType::MatrixType;
51 
53  itkNewMacro(Self);
54 
56  itkTypeMacro(ArrowSpatialObject, SpatialObject);
57 
60  void
61  Clear() override;
62 
64  itkSetMacro(PositionInObjectSpace, PointType);
65 
67  itkGetConstMacro(PositionInObjectSpace, PointType);
68 
70  itkSetMacro(DirectionInObjectSpace, VectorType);
71 
73  itkGetConstMacro(DirectionInObjectSpace, VectorType);
74 
76  itkSetMacro(LengthInObjectSpace, double);
77 
79  itkGetConstReferenceMacro(LengthInObjectSpace, double);
80 
82  bool
83  IsInsideInObjectSpace(const PointType & point) const override;
84 
85  /* Avoid hiding the overload that supports depth and name arguments */
86  using Superclass::IsInsideInObjectSpace;
87 
88  PointType
89  GetPositionInWorldSpace() const;
91  GetDirectionInWorldSpace() const;
92  double
93  GetLengthInWorldSpace() const;
94 
95 protected:
97  void
98  ComputeMyBoundingBox() override;
99 
101  ~ArrowSpatialObject() override = default;
102 
104  void
105  PrintSelf(std::ostream & os, Indent indent) const override;
106 
107  typename LightObject::Pointer
108  InternalClone() const override;
109 
110 private:
114 };
115 
116 } // end namespace itk
117 
118 #ifndef ITK_MANUAL_INSTANTIATION
119 # include "itkArrowSpatialObject.hxx"
120 #endif
121 
122 #endif // itkArrowSpatialObject_h
itkSpatialObject.h
itk::ArrowSpatialObject::MatrixType
typename TransformType::MatrixType MatrixType
Definition: itkArrowSpatialObject.h:50
itk::Vector< double, TDimension >
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::SpatialObject
Implementation of the composite pattern.
Definition: itkSpatialObject.h:57
itk::ArrowSpatialObject::ScalarType
double ScalarType
Definition: itkArrowSpatialObject.h:46
itk::ArrowSpatialObject::m_PositionInObjectSpace
PointType m_PositionInObjectSpace
Definition: itkArrowSpatialObject.h:112
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ArrowSpatialObject
Representation of a Arrow based on the spatial object classes.
Definition: itkArrowSpatialObject.h:37
itk::ArrowSpatialObject::m_LengthInObjectSpace
double m_LengthInObjectSpace
Definition: itkArrowSpatialObject.h:113
itk::ArrowSpatialObject::TransformType
typename Superclass::TransformType TransformType
Definition: itkArrowSpatialObject.h:49
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::Point< double, TDimension >
itk::ArrowSpatialObject::m_DirectionInObjectSpace
VectorType m_DirectionInObjectSpace
Definition: itkArrowSpatialObject.h:111
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293