00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef _itkIsoContourDistanceImageFilter_h
00018
#define _itkIsoContourDistanceImageFilter_h
00019
00020
#include "itkImageToImageFilter.h"
00021
#include "itkNarrowBand.h"
00022
#include "itkBarrier.h"
00023
00024
namespace itk
00025 {
00053
template <
class TInputImage,
class TOutputImage>
00054 class ITK_EXPORT IsoContourDistanceImageFilter :
00055
public ImageToImageFilter<TInputImage,TOutputImage>
00056 {
00057
public:
00059 typedef IsoContourDistanceImageFilter
Self;
00060 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
00061 typedef SmartPointer<Self> Pointer;
00062 typedef SmartPointer<const Self> ConstPointer;
00063
00065
itkNewMacro(
Self);
00066
00068
itkTypeMacro(IsoContourDistanceImageFilter,
ImageToImageFilter);
00069
00071 typedef typename Superclass::InputImageType
InputImageType;
00072 typedef typename Superclass::OutputImageType
OutputImageType;
00073
00076
itkStaticConstMacro(ImageDimension,
unsigned int, TInputImage::ImageDimension);
00077
00080 typedef typename OutputImageType::PixelType
PixelType;
00081 typedef typename InputImageType::PixelType
InputPixelType;
00082 typedef typename OutputImageType::RegionType
OutputImageRegionType;
00084
typedef typename InputImageType::SizeType
InputSizeType;
00085 typedef typename OutputImageType::SizeType
SizeType;
00086 typedef typename InputImageType::IndexType
InputIndexType;
00087 typedef typename OutputImageType::IndexType
IndexType;
00088
00090
typedef BandNode<IndexType,PixelType> BandNodeType;
00091 typedef NarrowBand<BandNodeType> NarrowBandType;
00092 typedef typename NarrowBandType::Pointer
NarrowBandPointer;
00093 typedef typename NarrowBandType::RegionType
RegionType;
00094 typedef typename NarrowBandType::ConstIterator
ConstBandIterator;
00095 typedef typename NarrowBandType::Iterator
BandIterator;
00096
00097
00100
itkSetMacro( LevelSetValue,
InputPixelType );
00101
itkGetMacro( LevelSetValue,
InputPixelType );
00102
00105
itkSetMacro( FarValue,
PixelType );
00106
itkGetMacro( FarValue,
PixelType );
00107
00108
00111
itkSetMacro( NarrowBanding,
bool );
00112
itkGetMacro( NarrowBanding,
bool );
00113
itkBooleanMacro( NarrowBanding );
00114
00115
00117
void SetNarrowBand(
NarrowBandType * ptr );
00118
NarrowBandPointer GetNarrowBand()
const
00119
{
return m_NarrowBand; }
00120
00121
00122 protected:
00123 IsoContourDistanceImageFilter();
00124 ~IsoContourDistanceImageFilter(){};
00125
void PrintSelf(std::ostream& os,
Indent indent)
const;
00126
00127
void ThreadedGenerateData(
const OutputImageRegionType& outputRegionForThread,
00128
int threadId );
00129 void ThreadedGenerateDataFull(
const OutputImageRegionType& outputRegionForThread,
00130
int threadId );
00131
void ThreadedGenerateDataBand(
const OutputImageRegionType& outputRegionForThread,
00132
int threadId );
00133
void BeforeThreadedGenerateData();
00134
00135
virtual void GenerateInputRequestedRegion();
00136
virtual void EnlargeOutputRequestedRegion(
DataObject * );
00137
00138
private:
00139 IsoContourDistanceImageFilter(
const Self&);
00140
void operator=(
const Self&);
00141
00142
InputPixelType m_LevelSetValue;
00143
PixelType m_FarValue;
00144
00145
bool m_NarrowBanding;
00146
NarrowBandPointer m_NarrowBand;
00147 std::vector<RegionType> m_NarrowBandRegion;
00148
00150
typename Barrier::Pointer m_Barrier;
00151 };
00152
00153 }
00154
00155
#ifndef ITK_MANUAL_INSTANTIATION
00156
#include "itkIsoContourDistanceImageFilter.txx"
00157
#endif
00158
00159
#endif