Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkITKImageMargin.h
Go to the documentation of this file.
1 /*==============================================================================
2 
3  Copyright (c) Laboratory for Percutaneous Surgery (PerkLab)
4  Queen's University, Kingston, ON, Canada. All Rights Reserved.
5 
6  See COPYRIGHT.txt
7  or http://www.slicer.org/copyright/copyright.txt for details.
8 
9  Unless required by applicable law or agreed to in writing, software
10  distributed under the License is distributed on an "AS IS" BASIS,
11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  See the License for the specific language governing permissions and
13  limitations under the License.
14 
15  This file was originally developed by Kyle Sunderland, PerkLab, Queen's University
16  and was supported through CANARIE's Research Software Program, Cancer
17  Care Ontario, OpenAnatomy, and Brigham and Women�s Hospital through NIH grant R01MH112748.
18 
19 ==============================================================================*/
20 
21 #ifndef __vtkITKImageMargin_h
22 #define __vtkITKImageMargin_h
23 
24 #include "vtkITK.h"
25 #include "vtkSimpleImageToImageFilter.h"
26 
31 class VTK_ITK_EXPORT vtkITKImageMargin : public vtkSimpleImageToImageFilter
32 {
33  public:
34  static vtkITKImageMargin *New();
35  vtkTypeMacro(vtkITKImageMargin, vtkSimpleImageToImageFilter);
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
40  vtkGetMacro(BackgroundValue, int);
41  vtkSetMacro(BackgroundValue, int);
42 
44  vtkGetMacro(CalculateMarginInMM, bool);
45  vtkSetMacro(CalculateMarginInMM, bool);
46  vtkBooleanMacro(CalculateMarginInMM, bool);
47 
51  vtkGetMacro(OuterMarginMM, double);
52  vtkSetMacro(OuterMarginMM, double);
53 
57  vtkGetMacro(InnerMarginMM, double);
58  vtkSetMacro(InnerMarginMM, double);
59 
63  vtkGetMacro(OuterMarginVoxels, double);
64  vtkSetMacro(OuterMarginVoxels, double);
65 
69  vtkGetMacro(InnerMarginVoxels, double);
70  vtkSetMacro(InnerMarginVoxels, double);
71 
72 protected:
73  int BackgroundValue{0};
74  bool CalculateMarginInMM{true};
75  double OuterMarginMM{0.0};
76  double InnerMarginMM{0.0};
77  double OuterMarginVoxels{0.0};
78  double InnerMarginVoxels{0.0};
79 
80 protected:
82  ~vtkITKImageMargin() override;
83 
84  void SimpleExecute(vtkImageData* input, vtkImageData* output) override;
85 
86 private:
87  vtkITKImageMargin(const vtkITKImageMargin&) = delete;
88  void operator=(const vtkITKImageMargin&) = delete;
89 };
90 
91 #endif
ITK-based utilities for manipulating connected regions in label maps. Limitation: The filter does not...