GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
itkMorphologicalWatershedImageFilter2.h
Go to the documentation of this file.
1 /*=========================================================================
2  Authors: The GoFigure Dev. Team.
3  at Megason Lab, Systems biology, Harvard Medical school, 2009-11
4 
5  Copyright (c) 2009-11, President and Fellows of Harvard College.
6  All rights reserved.
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are met:
10 
11  Redistributions of source code must retain the above copyright notice,
12  this list of conditions and the following disclaimer.
13  Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16  Neither the name of the President and Fellows of Harvard College
17  nor the names of its contributors may be used to endorse or promote
18  products derived from this software without specific prior written
19  permission.
20 
21  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
25  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
30  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 =========================================================================*/
34 
35 
36 /*=========================================================================
37 
38  Program: Insight Segmentation & Registration Toolkit
39  Module: $RCSfile: itkMorphologicalWatershedImageFilter2.h,v $
40  Language: C++
41  Date: $Date: 2009-04-23 03:43:42 $
42  Version: $Revision: 1.3 $
43 
44  Copyright (c) Insight Software Consortium. All rights reserved.
45  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
46 
47  This software is distributed WITHOUT ANY WARRANTY; without even
48  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
49  PURPOSE. See the above copyright notices for more information.
50 
51 =========================================================================*/
52 #ifndef __itkMorphologicalWatershedImageFilter2_h
53 #define __itkMorphologicalWatershedImageFilter2_h
54 
55 #include "itkImageToImageFilter.h"
56 
57 namespace itk
58 {
79 template< class TInputImage, class TOutputImage >
81  public ImageToImageFilter< TInputImage, TOutputImage >
82 {
83 public:
86  typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
87  typedef SmartPointer< Self > Pointer;
88  typedef SmartPointer< const Self > ConstPointer;
89 
91  typedef TInputImage InputImageType;
92  typedef TOutputImage OutputImageType;
93  typedef typename InputImageType::Pointer InputImagePointer;
94  typedef typename InputImageType::ConstPointer InputImageConstPointer;
95  typedef typename InputImageType::RegionType InputImageRegionType;
96  typedef typename InputImageType::PixelType InputImagePixelType;
97  typedef typename OutputImageType::Pointer OutputImagePointer;
98  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
99  typedef typename OutputImageType::RegionType OutputImageRegionType;
100  typedef typename OutputImageType::PixelType OutputImagePixelType;
101 
103  itkStaticConstMacro(InputImageDimension, unsigned int,
104  TInputImage::ImageDimension);
105  itkStaticConstMacro(OutputImageDimension, unsigned int,
106  TOutputImage::ImageDimension);
107 
109  itkNewMacro(Self);
110 
113  ImageToImageFilter);
114 
121  itkSetMacro(FullyConnected, bool);
122  itkGetConstReferenceMacro(FullyConnected, bool);
123  itkBooleanMacro(FullyConnected);
124 
130  itkSetMacro(MarkWatershedLine, bool);
131  itkGetConstReferenceMacro(MarkWatershedLine, bool);
132  itkBooleanMacro(MarkWatershedLine);
133 
138 
140  void SetForegroundImage(TOutputImage *fg)
141  {
142  m_ForegroundImg = fg;
143  }
144 
145 protected:
148  void PrintSelf(std::ostream & os, Indent indent) const;
149 
154 
156  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) );
157 
160  void GenerateData();
161 
163 private:
164  MorphologicalWatershedImageFilter2(const Self &); //purposely not implemented
165  void operator=(const Self &); //purposely not implemented
166 
168 
170 
172 }; // end of class
173 } // end namespace itk
174 
175 #ifndef ITK_MANUAL_INSTANTIATION
176 #include "itkMorphologicalWatershedImageFilter2.txx"
177 #endif
178 
179 #endif
itkGetConstMacro(Level, InputImagePixelType)
itkGetConstReferenceMacro(FullyConnected, bool)
itkTypeMacro(MorphologicalWatershedImageFilter2, ImageToImageFilter)
void EnlargeOutputRequestedRegion(DataObject *itkNotUsed(output))
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
void PrintSelf(std::ostream &os, Indent indent) const
ImageToImageFilter< TInputImage, TOutputImage > Superclass