GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
itkGradientWeightedIntensityImageFilter.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 #ifndef __itkGradientWeightedIntensityImageFilter_h
36 #define __itkGradientWeightedIntensityImageFilter_h
37 
38 #if defined( _MSC_VER )
39 #pragma warning ( disable : 4786 )
40 #endif
41 
42 #ifdef __BORLANDC__
43 #define ITK_LEAN_AND_MEAN
44 #endif
45 
46 #include "itkImageToImageFilter.h"
47 #include "itkGradientMagnitudeRecursiveGaussianImageFilter.h"
48 #include "itkSigmoidImageFilter.h"
49 #include "itkImageRegionIteratorWithIndex.h"
51 #include "itkRescaleIntensityImageFilter.h"
52 #include "itkImageRegionIterator.h"
53 #include "itkImageRegionConstIterator.h"
54 #include "itkImageRegion.h"
55 #include "itkRegion.h"
56 #include "itkIndex.h"
57 #include "itkSize.h"
58 
59 #include "itkImageFileWriter.h"
60 
61 namespace itk
62 {
63 template< class TFeatureImage, class TInputImage, class TSegmentImage >
65  public ImageToImageFilter< TFeatureImage, TInputImage >
66 {
67 public:
69  typedef ImageToImageFilter< TFeatureImage, TInputImage > Superclass;
70  typedef SmartPointer< Self > Pointer;
71  typedef SmartPointer< const Self > ConstPointer;
72 
73  itkStaticConstMacro (ImageDimension, unsigned int,
74  TFeatureImage::ImageDimension);
75 
77  itkNewMacro (Self);
78 
81 
83  void PrintSelf(std::ostream & os, Indent indent) const;
84 
85  typedef TFeatureImage FeatureImageType;
86  typedef typename FeatureImageType::Pointer FeatureImagePointer;
87  typedef typename FeatureImageType::ConstPointer FeatureImageConstPointer;
88  typedef typename FeatureImageType::PixelType FeatureImagePixelType;
89  typedef typename FeatureImageType::RegionType FeatureImageRegionType;
90  typedef typename FeatureImageType::SizeType FeatureImageSizeType;
91  typedef typename FeatureImageSizeType::SizeValueType FeatureImageSizeValueType;
92  typedef typename FeatureImageType::SpacingType FeatureImageSpacingType;
93  typedef typename FeatureImageType::IndexType FeatureImageIndexType;
94  typedef typename FeatureImageType::PointType FeatureImagePointType;
95 
96  typedef TInputImage ImageType;
97  typedef typename ImageType::Pointer ImagePointer;
98  typedef typename ImageType::ConstPointer ImageConstPointer;
99  typedef typename ImageType::PixelType ImagePixelType;
100  typedef typename ImageType::RegionType ImageRegionType;
101  typedef typename ImageType::SizeType ImageSizeType;
102  typedef typename ImageSizeType::SizeValueType ImageSizeValueType;
103  typedef typename ImageType::SpacingType ImageSpacingType;
104  typedef typename ImageType::IndexType ImageIndexType;
105  typedef typename ImageType::PointType ImagePointType;
106 
107  typedef TSegmentImage SegmentImageType;
108  typedef typename SegmentImageType::Pointer SegmentImagePointer;
109  typedef typename SegmentImageType::ConstPointer SegmentImageConstPointer;
110  typedef typename SegmentImageType::IndexType SegmentImageIndexType;
111  typedef typename SegmentImageType::PixelType SegmentImagePixelType;
112 
116  typedef RescaleIntensityImageFilter< ImageType, ImageType >
118  typedef typename RescaleFilterType::Pointer RescaleFilterPointer;
119 
120  typedef GradientMagnitudeRecursiveGaussianImageFilter< FeatureImageType, ImageType >
122  typedef typename GradientFilterType::Pointer GradientFilterPointer;
123  typedef SigmoidImageFilter< ImageType, ImageType > SigmoidFilterType;
124  typedef typename SigmoidFilterType::Pointer SigmoidFilterPointer;
125 
126  typedef ImageRegionConstIterator< FeatureImageType > ConstIteratorType;
127  typedef ImageRegionIterator< FeatureImageType > FIteratorType;
128  typedef ImageRegionIterator< ImageType > IteratorType;
129  typedef ImageRegionIteratorWithIndex< ImageType > IndexIteratorType;
130 
132  {
133  m_Blob = blob;
134  }
135 
137  {
138  m_Form = form;
139  }
140 
141  itkGetConstMacro (LargestCellRadius, double);
142  itkSetMacro (LargestCellRadius, double);
143  itkGetConstMacro (NucleiSigma, double);
144  itkSetMacro (NucleiSigma, double);
145  itkGetConstMacro (Alpha, double);
146  itkSetMacro (Alpha, double);
147  itkGetConstMacro (Beta, double);
148  itkSetMacro (Beta, double);
149  itkGetConstMacro (Gamma, double);
150  itkSetMacro (Gamma, double);
151 protected:
154  void Normalize();
155 
156  void GenerateData();
157 
160  double m_Alpha;
161  double m_Beta;
162  double m_Gamma;
163 
166 private:
167 
168  GradientWeightedIntensityImageFilter (Self &); // intentionally not
169  // implemented
170  void operator=(const Self &); // intentionally not
171  // implemented
172 };
173 } /* namespace itk */
174 
175 #include "itkGradientWeightedIntensityImageFilter.txx"
176 #endif
itkSetMacro(LargestCellRadius, double)
SigmoidImageFilter< ImageType, ImageType > SigmoidFilterType
GradientMagnitudeRecursiveGaussianImageFilter< FeatureImageType, ImageType > GradientFilterType
ImageToImageFilter< TFeatureImage, TInputImage > Superclass
MultiScaleLoGImageFilter< FeatureImageType, ImageType > MultiScaleLoGFilterType
itkStaticConstMacro(ImageDimension, unsigned int, TFeatureImage::ImageDimension)
ImageRegionConstIterator< FeatureImageType > ConstIteratorType
ImageRegionIteratorWithIndex< ImageType > IndexIteratorType
A filter to enhance 3D blob structures using LoG filter.
itkGetConstMacro(LargestCellRadius, double)
itkTypeMacro(GradientWeightedIntensityImageFilter, ImageToImageFilter)
void PrintSelf(std::ostream &os, Indent indent) const
RescaleIntensityImageFilter< ImageType, ImageType > RescaleFilterType