RTK  1.4.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,
42  class TOutputImage >
44  public itk::InPlaceImageFilter<TInputImage,TOutputImage>
45 {
46 
47 public:
53 
55  typedef typename TOutputImage::RegionType OutputImageRegionType;
60 
62  itkNewMacro ( Self );
63 
66 
68  itkGetModifiableObjectMacro(ConvexShape, ConvexShape);
69  itkSetObjectMacro(ConvexShape, ConvexShape);
71 
72 protected:
75 
78  void BeforeThreadedGenerateData() ITK_OVERRIDE;
79 
81 #if ITK_VERSION_MAJOR<5
82  void ThreadedGenerateData( const OutputImageRegionType& outputRegionForThread,
83  ThreadIdType threadId ) ITK_OVERRIDE;
84 #else
85  void DynamicThreadedGenerateData( const OutputImageRegionType& outputRegionForThread ) ITK_OVERRIDE;
86 #endif
87 
88 
89 private:
90  DrawConvexImageFilter ( const Self& ); //purposely not implemented
91  void operator=(const Self&); //purposely not implemented
92 
93  ConvexShapePointer m_ConvexShape;
94 };
95 
96 
97 } // end namespace rtk
98 
99 #ifndef ITK_MANUAL_INSTANTIATION
100 #include "rtkDrawConvexImageFilter.hxx"
101 #endif
102 
103 #endif
void operator=(const Self &)
itk::SmartPointer< Self > Pointer
itk::InPlaceImageFilter< TInputImage, TOutputImage > Superclass
void BeforeThreadedGenerateData() override
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
ConvexShape::VectorType VectorType
unsigned int ThreadIdType
itk::SmartPointer< const Self > ConstPointer
TOutputImage::RegionType OutputImageRegionType
ConvexShape::ScalarType ScalarType
ConvexShape::Pointer ConvexShapePointer
ConvexShape::PointType PointType
Draws a rtk::ConvexShape in a 3D image.
Base class for a 3D convex shape.