RTK  2.6.0
Reconstruction Toolkit
rtkDrawConvexImageFilter.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 rtkDrawConvexImageFilter_h
20 #define rtkDrawConvexImageFilter_h
21 
22 
23 #include <itkInPlaceImageFilter.h>
24 #include "rtkConvexShape.h"
25 #include "rtkMacro.h"
26 
27 namespace rtk
28 {
29 
41 template <class TInputImage, class TOutputImage>
42 class ITK_TEMPLATE_EXPORT DrawConvexImageFilter : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_MOVE(DrawConvexImageFilter);
46 
52 
54  using OutputImageRegionType = typename TOutputImage::RegionType;
59 
61  itkNewMacro(Self);
62 
64 #ifdef itkOverrideGetNameOfClassMacro
65  itkOverrideGetNameOfClassMacro(DrawConvexImageFilter);
66 #else
68 #endif
69 
70 
72  itkGetModifiableObjectMacro(ConvexShape, ConvexShape);
73  itkSetObjectMacro(ConvexShape, ConvexShape);
75 
76 protected:
78  ~DrawConvexImageFilter() override = default;
79 
82  void
83  BeforeThreadedGenerateData() override;
84 
86  void
87  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
88 
89 private:
91 };
92 
93 
94 } // end namespace rtk
95 
96 #ifndef ITK_MANUAL_INSTANTIATION
97 # include "rtkDrawConvexImageFilter.hxx"
98 #endif
99 
100 #endif
itk::Vector< ScalarType, Dimension > VectorType
itk::SmartPointer< Self > Pointer
ConvexShape::ScalarType ScalarType
typename OutputImageType::RegionType OutputImageRegionType
Draws a rtk::ConvexShape in a 3D image.
Base class for a 3D convex shape.
itk::Vector< ScalarType, Dimension > PointType