ITK  6.0.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 * https://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
23namespace itk
24{
36template <unsigned int TDimension = 3>
37class ITK_TEMPLATE_EXPORT ArrowSpatialObject : public SpatialObject<TDimension>
38{
39public:
40 ITK_DISALLOW_COPY_AND_MOVE(ArrowSpatialObject);
41
46 using ScalarType = double;
49 using typename Superclass::TransformType;
51
53 itkNewMacro(Self);
54
56 itkOverrideGetNameOfClassMacro(ArrowSpatialObject);
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
92 double
94
95protected:
97 void
99
101 ~ArrowSpatialObject() override = default;
102
103 void
104 PrintSelf(std::ostream & os, Indent indent) const override;
105
106 typename LightObject::Pointer
107 InternalClone() const override;
108
109private:
110 VectorType m_DirectionInObjectSpace{};
111 PointType m_PositionInObjectSpace{};
112 double m_LengthInObjectSpace{};
113};
114
115} // end namespace itk
116
117#ifndef ITK_MANUAL_INSTANTIATION
118# include "itkArrowSpatialObject.hxx"
119#endif
120
121#endif // itkArrowSpatialObject_h
Representation of a Arrow based on the spatial object classes.
void PrintSelf(std::ostream &os, Indent indent) const override
PointType GetPositionInWorldSpace() const
typename TransformType::MatrixType MatrixType
void Clear() override
LightObject::Pointer InternalClone() const override
bool IsInsideInObjectSpace(const PointType &point) const override
double GetLengthInWorldSpace() const
void ComputeMyBoundingBox() override
VectorType GetDirectionInWorldSpace() const
~ArrowSpatialObject() override=default
Base class for all data objects in ITK.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Base class for most ITK classes.
Definition: itkObject.h:62
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:54
Implementation of the composite pattern.
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents