RTK  2.0.1
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,
42  class TOutputImage >
44  public itk::InPlaceImageFilter<TInputImage,TOutputImage>
45 {
46 public:
47  ITK_DISALLOW_COPY_AND_ASSIGN(DrawConvexImageFilter);
48 
54 
56  using OutputImageRegionType = typename TOutputImage::RegionType;
61 
63  itkNewMacro ( Self );
64 
67 
69  itkGetModifiableObjectMacro(ConvexShape, ConvexShape);
70  itkSetObjectMacro(ConvexShape, ConvexShape);
72 
73 protected:
75  ~DrawConvexImageFilter() override = default;
76 
79  void BeforeThreadedGenerateData() override;
80 
82 #if ITK_VERSION_MAJOR<5
83  void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread,
84  ThreadIdType threadId ) override;
85 #else
86  void DynamicThreadedGenerateData( const OutputImageRegionType& outputRegionForThread ) override;
87 #endif
88 
89 
90 private:
92 };
93 
94 
95 } // end namespace rtk
96 
97 #ifndef ITK_MANUAL_INSTANTIATION
98 #include "rtkDrawConvexImageFilter.hxx"
99 #endif
100 
101 #endif
itk::Vector< ScalarType, Dimension > VectorType
void BeforeThreadedGenerateData() override
itk::SmartPointer< Self > Pointer
itk::Vector< ScalarType, Dimension > PointType
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
~DrawConvexImageFilter() override=default
ConvexShape::ScalarType ScalarType
virtual void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread)
typename OutputImageType::RegionType OutputImageRegionType
unsigned int ThreadIdType
Draws a rtk::ConvexShape in a 3D image.
Base class for a 3D convex shape.