RTK  2.1.0
Reconstruction Toolkit
rtkImageToVectorImageFilter.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 #ifndef rtkImageToVectorImageFilter_h
19 #define rtkImageToVectorImageFilter_h
20 
21 #include "rtkMacro.h"
22 
23 #include <itkImageToImageFilter.h>
25 
26 namespace rtk
27 {
46 template <typename InputImageType, typename OutputImageType>
47 class ImageToVectorImageFilter : public itk::ImageToImageFilter<InputImageType, OutputImageType>
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_ASSIGN(ImageToVectorImageFilter);
51 
56 
57  using OutputImageRegionType = typename OutputImageType::RegionType;
58 
60  itkNewMacro(Self);
61 
64 
68  itkSetMacro(NumberOfChannels, unsigned int);
69  itkGetMacro(NumberOfChannels, unsigned int);
71 
72 protected:
74  ~ImageToVectorImageFilter() override = default;
75 
76  void
77  GenerateOutputInformation() override;
78  void
80 
82  void
83  ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
84  itk::ThreadIdType itkNotUsed(threadId)) override;
85 
88  GetImageRegionSplitter() const override;
90 
91  unsigned int m_NumberOfChannels;
92 };
93 } // namespace rtk
94 
95 
96 #ifndef ITK_MANUAL_INSTANTIATION
97 # include "rtkImageToVectorImageFilter.hxx"
98 #endif
99 
100 #endif
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, itk::ThreadIdType) override
const itk::ImageRegionSplitterBase * GetImageRegionSplitter() const override
itk::ImageRegionSplitterDirection::Pointer m_Splitter
~ImageToVectorImageFilter() override=default
#define itkSetMacro(name, type)
void GenerateOutputInformation() override
typename OutputImageType::RegionType OutputImageRegionType
unsigned int ThreadIdType
void GenerateInputRequestedRegion() override
Re-writes an image as a vector image.