GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
itkCellPreprocess.h
Go to the documentation of this file.
1 /*=========================================================================
2  Author: $Author$ // Author of last commit
3  Version: $Rev$ // Revision of last commit
4  Date: $Date$ // Date of last commit
5 =========================================================================*/
6 
7 /*=========================================================================
8  Authors: The GoFigure Dev. Team.
9  at Megason Lab, Systems biology, Harvard Medical school, 2009
10 
11  Copyright (c) 2009, President and Fellows of Harvard College.
12  All rights reserved.
13 
14  Redistribution and use in source and binary forms, with or without
15  modification, are permitted provided that the following conditions are met:
16 
17  Redistributions of source code must retain the above copyright notice,
18  this list of conditions and the following disclaimer.
19  Redistributions in binary form must reproduce the above copyright notice,
20  this list of conditions and the following disclaimer in the documentation
21  and/or other materials provided with the distribution.
22  Neither the name of the President and Fellows of Harvard College
23  nor the names of its contributors may be used to endorse or promote
24  products derived from this software without specific prior written
25  permission.
26 
27  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
29  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
31  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
32  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
33  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
34  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
35  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
36  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
37  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 
39 =========================================================================*/
40 
41 #ifndef __itkCellPreprocess_h
42 #define __itkCellPreprocess_h
43 
44 #if defined( _MSC_VER )
45 #pragma warning ( disable : 4786 )
46 #endif
47 
48 #ifdef __BORLANDC__
49 #define ITK_LEAN_AND_MEAN
50 #endif
51 
52 #include "itkImageToImageFilter.h"
53 #include "itkCastImageFilter.h"
54 #include "itkMedianImageFilter.h"
55 #include "itkGrayscaleFillholeImageFilter.h"
56 #include "itkGradientAnisotropicDiffusionImageFilter.h"
57 
58 namespace itk
59 {
60 template< class TInputImage, class TOutputImage = TInputImage >
61 class ITK_EXPORT CellPreprocess:
62  public ImageToImageFilter< TInputImage, TOutputImage >
63 {
64 public:
65 
67  typedef ImageToImageFilter< TInputImage, TOutputImage > Superclass;
68  typedef SmartPointer< Self > Pointer;
69  typedef SmartPointer< const Self > ConstPointer;
70 
71  itkStaticConstMacro (ImageDimension, unsigned int,
72  TInputImage::ImageDimension);
73 
75  itkNewMacro (Self);
76 
78  itkTypeMacro (CellPreprocess, ImageToImageFilter);
79 
81  void PrintSelf(std::ostream & os, Indent indent) const;
82 
83  typedef Image< float, ImageDimension > ImageType;
84  typedef typename ImageType::Pointer ImagePointer;
85  typedef typename ImageType::ConstPointer ImageConstPointer;
86  typedef typename ImageType::PixelType ImagePixelType;
87  typedef typename ImageType::RegionType ImageRegionType;
88  typedef typename ImageType::SizeType ImageSizeType;
89  typedef typename ImageSizeType::SizeValueType ImageSizeValueType;
90 
91  typedef typename ImageType::SpacingType ImageSpacingType;
92  typedef typename ImageType::IndexType ImageIndexType;
93  typedef typename ImageType::PointType ImagePointType;
94 
95  typedef CastImageFilter< TInputImage, ImageType > InputCastType;
96  typedef typename InputCastType::Pointer InputCastPointer;
97 
98  typedef MedianImageFilter< ImageType, ImageType > MedianFilterType;
99  typedef typename MedianFilterType::Pointer MedianFilterPointer;
100 
101  typedef GradientAnisotropicDiffusionImageFilter< ImageType,
103  typedef typename SmoothingFilterType::Pointer
105 
106  typedef GrayscaleFillholeImageFilter< ImageType, ImageType > GrayscaleFillholeFilterType;
107  typedef typename GrayscaleFillholeFilterType::Pointer GrayscaleFillholePointer;
108 
109  typedef CastImageFilter< ImageType, TOutputImage > OutputCastType;
110  typedef typename OutputCastType::Pointer OutputCastPointer;
111 
112  itkGetConstMacro (LargestCellRadius, double);
113  itkSetMacro (LargestCellRadius, double);
114  itkGetConstMacro (MembraneData, bool);
115  itkSetMacro (MembraneData, bool);
116 protected:
117 
118  CellPreprocess();
120 
121  void GenerateData();
122 
125 private:
126 
127  CellPreprocess (Self &); // intentionally not implemented
128  void operator=(const Self &); // intentionally not implemented
129 };
130 } /* namespace itk */
131 
132 #include "itkCellPreprocess.txx"
133 #endif
GrayscaleFillholeFilterType::Pointer GrayscaleFillholePointer
MedianFilterType::Pointer MedianFilterPointer
InputCastType::Pointer InputCastPointer
SmartPointer< Self > Pointer
MedianImageFilter< ImageType, ImageType > MedianFilterType
SmoothingFilterType::Pointer SmoothingFilterPointer
ImageType::Pointer ImagePointer
Image< float, ImageDimension > ImageType
GrayscaleFillholeImageFilter< ImageType, ImageType > GrayscaleFillholeFilterType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
ImageType::PixelType ImagePixelType
CastImageFilter< TInputImage, ImageType > InputCastType
SmartPointer< const Self > ConstPointer
CastImageFilter< ImageType, TOutputImage > OutputCastType
ImageType::IndexType ImageIndexType
ImageType::SizeType ImageSizeType
GradientAnisotropicDiffusionImageFilter< ImageType, ImageType > SmoothingFilterType
ImageType::ConstPointer ImageConstPointer
ImageType::PointType ImagePointType
ImageSizeType::SizeValueType ImageSizeValueType
OutputCastType::Pointer OutputCastPointer
ImageType::RegionType ImageRegionType
ImageType::SpacingType ImageSpacingType