RTK  2.1.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  * 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 
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 DrawConvexImageFilter : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
43 {
44 public:
45  ITK_DISALLOW_COPY_AND_ASSIGN(DrawConvexImageFilter);
46 
52 
54  using OutputImageRegionType = typename TOutputImage::RegionType;
59 
61  itkNewMacro(Self);
62 
65 
67  itkGetModifiableObjectMacro(ConvexShape, ConvexShape);
68  itkSetObjectMacro(ConvexShape, ConvexShape);
70 
71 protected:
73  ~DrawConvexImageFilter() override = default;
74 
77  void
78  BeforeThreadedGenerateData() override;
79 
81  void
82  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
83 
84 private:
86 };
87 
88 
89 } // end namespace rtk
90 
91 #ifndef ITK_MANUAL_INSTANTIATION
92 # include "rtkDrawConvexImageFilter.hxx"
93 #endif
94 
95 #endif
itk::Vector< ScalarType, Dimension > VectorType
void BeforeThreadedGenerateData() override
itk::SmartPointer< Self > Pointer
~DrawConvexImageFilter() override=default
ConvexShape::ScalarType ScalarType
typename OutputImageType::RegionType OutputImageRegionType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
Draws a rtk::ConvexShape in a 3D image.
Base class for a 3D convex shape.
itk::Vector< ScalarType, Dimension > PointType