Orfeo Toolbox  4.2
itkIsoContourDistanceImageFilter.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 __itkIsoContourDistanceImageFilter_h
19 #define __itkIsoContourDistanceImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkNarrowBand.h"
24 #include "itkBarrier.h"
25 
26 namespace itk
27 {
56 template< typename TInputImage, typename TOutputImage >
58  public ImageToImageFilter< TInputImage, TOutputImage >
59 {
60 public:
66 
68  itkNewMacro(Self);
69 
72 
76 
79  itkStaticConstMacro(ImageDimension, unsigned int,
80  TInputImage::ImageDimension);
81  itkStaticConstMacro(OutputImageDimension, unsigned int,
82  TOutputImage::ImageDimension);
83 
86  typedef typename OutputImageType::PixelType PixelType;
87  typedef typename InputImageType::PixelType InputPixelType;
88  typedef typename OutputImageType::RegionType OutputImageRegionType;
89 
90  typedef typename InputImageType::SizeType InputSizeType;
91  typedef typename OutputImageType::SizeType SizeType;
92 
93  typedef typename InputImageType::IndexType InputIndexType;
94  typedef typename OutputImageType::IndexType IndexType;
95 
96  typedef typename InputImageType::SpacingType InputSpacingType;
97 
105 
108  itkSetMacro(LevelSetValue, InputPixelType);
109  itkGetConstMacro(LevelSetValue, InputPixelType);
110 
113  itkSetMacro(FarValue, PixelType);
114  itkGetConstMacro(FarValue, PixelType);
115 
118  itkSetMacro(NarrowBanding, bool);
119  itkGetConstMacro(NarrowBanding, bool);
120  itkBooleanMacro(NarrowBanding);
121 
123  void SetNarrowBand(NarrowBandType *ptr);
124 
126  { return m_NarrowBand; }
127 
128 #ifdef ITK_USE_CONCEPT_CHECKING
129  // Begin concept checking
130  itkConceptMacro( InputEqualityComparableCheck,
132  itkConceptMacro( OutputEqualityComparableCheck,
134  itkConceptMacro( SameDimensionCheck,
136  itkConceptMacro( DoubleConvertibleToOutputCheck,
138  itkConceptMacro( InputConvertibleToOutputCheck,
140  itkConceptMacro( OutputAdditiveOperatorsCheck,
142  itkConceptMacro( InputOStreamWritableCheck,
144  itkConceptMacro( OutputOStreamWritableCheck,
146  // End concept checking
147 #endif
148 
149 protected:
152  void PrintSelf(std::ostream & os, Indent indent) const;
153 
154  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread,
155  ThreadIdType threadId);
156 
157  void ThreadedGenerateDataFull(const OutputImageRegionType & outputRegionForThread,
158  ThreadIdType threadId);
159 
160  void ThreadedGenerateDataBand(const OutputImageRegionType & outputRegionForThread,
161  ThreadIdType threadId);
162 
164 
165  virtual void GenerateInputRequestedRegion();
166 
168 
171 
172  void ComputeValue( const InputNeighbordIteratorType& inNeigIt,
174  unsigned int center,
175  const std::vector< OffsetValueType >& stride );
176 
177 private:
178  IsoContourDistanceImageFilter(const Self &); //purposely not implemented
179  void operator=(const Self &); //purposely not implemented
180 
183 
185 
188  std::vector< RegionType > m_NarrowBandRegion;
189 
192 };
193 } // namespace itk
194 
195 #ifndef ITK_MANUAL_INSTANTIATION
197 #endif
198 
199 #endif

Generated at Sat Aug 30 2014 15:00:31 for Orfeo Toolbox with doxygen 1.8.3.1