ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkScalarChanAndVeseSparseLevelSetImageFilter.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 __itkScalarChanAndVeseSparseLevelSetImageFilter_h
19 #define __itkScalarChanAndVeseSparseLevelSetImageFilter_h
20 
24 
25 namespace itk
26 {
63 template< typename TInputImage, typename TFeatureImage, typename TOutputImage,
64  typename TFunction = ScalarChanAndVeseLevelSetFunction< TInputImage, TFeatureImage >,
65  class TSharedData = typename TFunction::SharedDataType,
66  typename TIdCell = unsigned int >
68  public MultiphaseSparseFiniteDifferenceImageFilter< TInputImage, TFeatureImage,
69  TOutputImage, TFunction, TIdCell >
70 {
71 public:
74  TFeatureImage, TOutputImage, TFunction, TIdCell > Superclass;
77 
79  itkNewMacro(Self);
80 
84 
85  itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
86 
91  typedef typename Superclass::ValueType ValueType;
93 
94  typedef TFeatureImage FeatureImageType;
95  typedef typename FeatureImageType::Pointer FeatureImagePointer;
96  typedef typename FeatureImageType::PixelType FeaturePixelType;
97  typedef typename FeatureImageType::IndexType FeatureIndexType;
99  typedef typename FeatureImageType::RegionType FeatureRegionType;
100 
102  typedef TOutputImage OutputImageType;
103  typedef typename OutputImageType::IndexType IndexType;
104  typedef typename OutputImageType::PixelType OutputPixelType;
105 
109 
111 
112  typedef TFunction FunctionType;
113  typedef typename FunctionType::Pointer FunctionPtr;
114 
115  typedef TSharedData SharedDataType;
116  typedef typename SharedDataType::Pointer SharedDataPointer;
117 
120 
121 #ifdef ITK_USE_CONCEPT_CHECKING
122  // Begin concept checking
123  itkConceptMacro( OutputHasNumericTraitsCheck,
125  // End concept checking
126 #endif
127 
130  virtual void SetFeatureImage(const FeatureImagePointer f)
131  {
132  this->SetInput(f);
133  }
134 
135 protected:
137  {
138  this->SetNumberOfLayers(2); // Narrow-band usage
139  this->m_SharedData = SharedDataType::New();
140  }
141 
143 
145 
146  virtual void Initialize();
147 
148  virtual void InitializeIteration();
149 
150  virtual void UpdatePixel(unsigned int functionIndex,
151  unsigned int idx, NeighborhoodIterator< InputImageType > & iterator,
152  ValueType & newValue, bool & status);
153 };
154 } //end namespace itk
155 
156 #ifndef ITK_MANUAL_INSTANTIATION
157 #include "itkScalarChanAndVeseSparseLevelSetImageFilter.hxx"
158 #endif
159 
160 #endif
signed long IndexValueType
Definition: itkIntTypes.h:150
RegionOfInterestImageFilter< FeatureImageType, FeatureImageType > ROIFilterType
Base class for all process objects that output image data.
MultiphaseSparseFiniteDifferenceImageFilter< TInputImage, TFeatureImage, TOutputImage, TFunction, TIdCell > Superclass
virtual void SetNumberOfLayers(unsigned int _arg)
virtual void UpdatePixel(unsigned int functionIndex, unsigned int idx, NeighborhoodIterator< InputImageType > &iterator, ValueType &newValue, bool &status)
virtual void SetInput(const InputImageType *image)
Sparse implementation of the Chan and Vese multiphase level set image filter.
This class implements a finite difference partial differential equation solver for evolving surfaces ...
Extract a region of interest from the input image.
#define itkConceptMacro(name, concept)
Defines iteration of a local N-dimensional neighborhood of pixels across an itk::Image.