ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkArrowSpatialObject.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 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:
38  public SpatialObject< TDimension >
39 {
40 public:
41  ITK_DISALLOW_COPY_AND_ASSIGN(ArrowSpatialObject);
42 
47  using ScalarType = double;
50  using TransformType = typename Superclass::TransformType;
51  using MatrixType = typename TransformType::MatrixType;
52 
54  itkNewMacro(Self);
55 
57  itkTypeMacro(ArrowSpatialObject, SpatialObject);
58 
60  itkSetMacro( PositionInObjectSpace, PointType );
61 
63  itkGetConstMacro(PositionInObjectSpace, PointType);
64 
66  itkSetMacro( DirectionInObjectSpace, VectorType );
67 
69  itkGetConstMacro(DirectionInObjectSpace, VectorType);
70 
72  itkSetMacro( LengthInObjectSpace, double);
73 
75  itkGetConstReferenceMacro(LengthInObjectSpace, double);
76 
78  bool ComputeMyBoundingBox() const override;
79 
81  bool IsInsideInObjectSpace(const PointType & point, unsigned int depth=0,
82  const std::string & name="") const override;
83 
84  PointType GetPositionInWorldSpace() const;
85  VectorType GetDirectionInWorldSpace() const;
86  double GetLengthInWorldSpace() const;
87 
88 protected:
89 
91  ~ArrowSpatialObject() override = default;
92 
94  void PrintSelf(std::ostream & os, Indent indent) const override;
95 
96  typename LightObject::Pointer InternalClone() const override;
97 
98 private:
102 };
103 
104 } // end namespace itk
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 #include "itkArrowSpatialObject.hxx"
108 #endif
109 
110 #endif // itkArrowSpatialObject_h
typename TransformType::MatrixType MatrixType
Implementation of the composite pattern.
typename Superclass::TransformType TransformType
Representation of a Arrow based on the spatial object classes.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for most ITK classes.
Definition: itkObject.h:60
Base class for all data objects in ITK.