ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkIsolatedWatershedImageFilter.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 #ifndef __itkIsolatedWatershedImageFilter_h
19 #define __itkIsolatedWatershedImageFilter_h
20 
23 
24 namespace itk
25 {
40 template< class TInputImage, class TOutputImage >
42  public ImageToImageFilter< TInputImage, TOutputImage >
43 {
44 public:
50 
52  itkNewMacro(Self);
53 
55  itkTypeMacro(IsolatedWatershedImageFilter,
57 
58  typedef TInputImage InputImageType;
59  typedef typename InputImageType::Pointer InputImagePointer;
60  typedef typename InputImageType::ConstPointer InputImageConstPointer;
61  typedef typename InputImageType::RegionType InputImageRegionType;
62  typedef typename InputImageType::PixelType InputImagePixelType;
63  typedef typename InputImageType::IndexType IndexType;
64  typedef typename InputImageType::SizeType SizeType;
65 
66  typedef TOutputImage OutputImageType;
67  typedef typename OutputImageType::Pointer OutputImagePointer;
68  typedef typename OutputImageType::RegionType OutputImageRegionType;
69  typedef typename OutputImageType::PixelType OutputImagePixelType;
70 
73 
76  void PrintSelf(std::ostream & os, Indent indent) const;
77 
81  itkSetMacro(Seed1, IndexType);
82  itkGetConstMacro(Seed1, IndexType);
84 
88  itkSetMacro(Seed2, IndexType);
89  itkGetConstMacro(Seed2, IndexType);
91 
93  itkSetMacro(Threshold, double);
94  itkGetConstMacro(Threshold, double);
96 
99  itkSetMacro(IsolatedValueTolerance, double);
100  itkGetConstMacro(IsolatedValueTolerance, double);
102 
105  itkSetMacro(UpperValueLimit, double);
106  itkGetConstMacro(UpperValueLimit, double);
108 
112  itkSetMacro(ReplaceValue1, OutputImagePixelType);
113  itkGetConstMacro(ReplaceValue1, OutputImagePixelType);
114  itkSetMacro(ReplaceValue2, OutputImagePixelType);
115  itkGetConstMacro(ReplaceValue2, OutputImagePixelType);
117 
119  itkGetConstMacro(IsolatedValue, double);
120 
121 protected:
126 
129 
131 
133 
134  double m_Threshold;
138 
139  // Override since the filter needs all the data for the algorithm
140  void GenerateInputRequestedRegion();
141 
142  // Override since the filter produces the entire dataset
143  void EnlargeOutputRequestedRegion(DataObject *output);
144 
145  void GenerateData();
146 
147 private:
148  IsolatedWatershedImageFilter(const Self &); //purposely not implemented
149  void operator=(const Self &); //purposely not implemented
150 };
151 } // end namespace itk
152 
153 #ifndef ITK_MANUAL_INSTANTIATION
154 #include "itkIsolatedWatershedImageFilter.hxx"
155 #endif
156 
157 #endif
158