ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkDrawBoxImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright RTK 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 * 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
19#ifndef rtkDrawBoxImageFilter_h
20#define rtkDrawBoxImageFilter_h
21
23#include "rtkBoxShape.h"
24#include "rtkConfiguration.h"
25
26namespace rtk
27{
28
38template <class TInputImage, class TOutputImage>
39class ITK_TEMPLATE_EXPORT DrawBoxImageFilter : public DrawConvexImageFilter<TInputImage, TOutputImage>
40{
41public:
42 ITK_DISALLOW_COPY_AND_MOVE(DrawBoxImageFilter);
43
49
56
58 itkNewMacro(Self);
59
61 itkOverrideGetNameOfClassMacro(DrawBoxImageFilter);
62
64 itkGetMacro(Density, ScalarType);
66
68 itkGetConstReferenceMacro(PlaneDirections, std::vector<VectorType>);
69 itkGetConstReferenceMacro(PlanePositions, std::vector<ScalarType>);
70
72 void
73 AddClipPlane(const VectorType & dir, const ScalarType & pos);
74
76 void
77 SetBoxFromImage(const ImageBaseType * img, bool bWithExternalHalfPixelBorder = true);
78
80 itkGetMacro(BoxMin, PointType);
82 itkGetMacro(BoxMax, PointType);
84 itkGetMacro(Direction, RotationMatrixType);
86
87protected:
90
91 void
93
94private:
96 std::vector<VectorType> m_PlaneDirections;
97 std::vector<ScalarType> m_PlanePositions;
98
102};
103
104} // end namespace rtk
105
106#ifndef ITK_MANUAL_INSTANTIATION
107# include "rtkDrawBoxImageFilter.hxx"
108#endif
109
110#endif
Implements transparent reference counting.
Superclass::ScalarType ScalarType
Definition rtkBoxShape.h:55
Superclass::VectorType VectorType
Definition rtkBoxShape.h:57
itk::ImageBase< Dimension > ImageBaseType
Definition rtkBoxShape.h:59
Superclass::RotationMatrixType RotationMatrixType
Definition rtkBoxShape.h:58
Superclass::PointType PointType
Definition rtkBoxShape.h:56
itk::SmartPointer< Self > Pointer
BoxShape::VectorType VectorType
std::vector< VectorType > m_PlaneDirections
void BeforeThreadedGenerateData() override
DrawConvexImageFilter< TInputImage, TOutputImage > Superclass
BoxShape::ScalarType ScalarType
itk::SmartPointer< const Self > ConstPointer
void SetBoxFromImage(const ImageBaseType *img, bool bWithExternalHalfPixelBorder=true)
BoxShape::PointType PointType
BoxShape::ImageBaseType ImageBaseType
void AddClipPlane(const VectorType &dir, const ScalarType &pos)
BoxShape::RotationMatrixType RotationMatrixType
std::vector< ScalarType > m_PlanePositions
#define itkSetMacro(name, type)