ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkChangeRegionLabelMapFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software 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  *
20  * Portions of this file are subject to the VTK Toolkit Version 3 copyright.
21  *
22  * Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
23  *
24  * For complete copyright, license and disclaimer of warranty information
25  * please refer to the NOTICE file at the top of the ITK source tree.
26  *
27  *=========================================================================*/
28 #ifndef itkChangeRegionLabelMapFilter_h
29 #define itkChangeRegionLabelMapFilter_h
30 
32 
33 namespace itk
34 {
55 template< typename TInputImage >
56 class ITK_TEMPLATE_EXPORT ChangeRegionLabelMapFilter:public InPlaceLabelMapFilter< TInputImage >
57 {
58 public:
59  ITK_DISALLOW_COPY_AND_ASSIGN(ChangeRegionLabelMapFilter);
60 
66 
69 
71  itkNewMacro(Self);
72 
74  using OutputImageType = typename Superclass::OutputImageType;
75  using OutputImagePointer = typename Superclass::OutputImagePointer;
77  using OutputImagePixelType = typename Superclass::OutputImagePixelType;
78 
80  using InputImageType = TInputImage;
81  using InputImagePointer = typename InputImageType::Pointer;
82  using InputImageConstPointer = typename InputImageType::ConstPointer;
84  using InputImagePixelType = typename InputImageType::PixelType;
85  using LabelObjectType = typename InputImageType::LabelObjectType;
86 
87  using PixelType = typename InputImageType::PixelType;
92 
93  using TOutputImage = TInputImage;
94 
96  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
97  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
98  static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
99 
101  itkSetMacro(Region, OutputImageRegionType);
102  itkGetConstReferenceMacro(Region, OutputImageRegionType);
104 
105 protected:
106  ChangeRegionLabelMapFilter() = default;
107  ~ChangeRegionLabelMapFilter() override = default;
108 
109  void PrintSelf(std::ostream & os, Indent indent) const override;
110 
111  void ThreadedProcessLabelObject(LabelObjectType *labelObject) override;
112 
113  void GenerateInputRequestedRegion() override;
114 
115  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) override;
116 
117  void GenerateOutputInformation() override;
118 
119  void GenerateData() override;
120 
121 private:
123 };
124 } // end namespace itk
125 
126 #ifndef ITK_MANUAL_INSTANTIATION
127 #include "itkChangeRegionLabelMapFilter.hxx"
128 #endif
129 
130 #endif
typename InputImageType::RegionType InputImageRegionType
typename InputImageType::PixelType InputImagePixelType
typename Superclass::OutputImagePointer OutputImagePointer
Light weight base class for most itk classes.
typename Superclass::OutputImagePixelType OutputImagePixelType
typename InputImageType::IndexType IndexType
typename InputImageType::ConstPointer InputImageConstPointer
typename Superclass::OutputImageType OutputImageType
typename Superclass::OutputImageRegionType OutputImageRegionType
typename InputImageType::LabelObjectType LabelObjectType
Base class for filters that takes an image as input and overwrites that image as the output...
signed long IndexValueType
Definition: itkIntTypes.h:90
typename InputImageType::PixelType PixelType
typename Superclass::OutputImageRegionType OutputImageRegionType
typename InputImageType::SizeType SizeType
A region represents some portion or piece of data.
Definition: itkRegion.h:64
typename InputImageType::RegionType RegionType
typename InputImageType::IndexValueType IndexValueType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Base class for filters that take an image as input and overwrite that image as the output...
typename InputImageType::Pointer InputImagePointer
Base class for all data objects in ITK.
Change the region of a label map.