ITK  4.2.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 
86  itkSetMacro(Seed2, IndexType);
87 
89  itkSetMacro(Threshold, double);
90  itkGetConstMacro(Threshold, double);
92 
95  itkSetMacro(IsolatedValueTolerance, double);
96  itkGetConstMacro(IsolatedValueTolerance, double);
98 
101  itkSetMacro(UpperValueLimit, double);
102  itkGetConstMacro(UpperValueLimit, double);
104 
108  itkSetMacro(ReplaceValue1, OutputImagePixelType);
109  itkGetConstMacro(ReplaceValue1, OutputImagePixelType);
110  itkSetMacro(ReplaceValue2, OutputImagePixelType);
111  itkGetConstMacro(ReplaceValue2, OutputImagePixelType);
113 
115  itkGetConstMacro(IsolatedValue, double);
116 protected:
122 
125 
127 
129 
130  double m_Threshold;
134 
135  // Override since the filter needs all the data for the algorithm
136  void GenerateInputRequestedRegion();
137 
138  // Override since the filter produces the entire dataset
139  void EnlargeOutputRequestedRegion(DataObject *output);
140 
141  void GenerateData();
142 
143 private:
144  IsolatedWatershedImageFilter(const Self &); //purposely not implemented
145  void operator=(const Self &); //purposely not implemented
146 };
147 } // end namespace itk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
150 #include "itkIsolatedWatershedImageFilter.hxx"
151 #endif
152 
153 #endif
154