00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkMedialNodeTripletCorrespondenceProcess_h
00018 #define __itkMedialNodeTripletCorrespondenceProcess_h
00019
00020 #include "itkImage.h"
00021 #include "itkProcessObject.h"
00022 #include "itkBloxCoreAtomImage.h"
00023 #include "itkBloxCoreAtomPixel.h"
00024 #include "itkMatrixResizeableDataObject.h"
00025
00026 #include "itkPNGImageIO.h"
00027 #include "itkImageFileWriter.h"
00028 #include "itkRawImageIO.h"
00029
00030 #include "itkCorrespondenceDataStructure.h"
00031 #include "itkCorrespondenceDataStructureIterator.h"
00032
00033 namespace itk
00034 {
00035
00044 template< typename TSourceImage >
00045 class MedialNodeTripletCorrespondenceProcess : public ProcessObject
00046 {
00047 public:
00048
00050 itkStaticConstMacro(NDimensions, unsigned int, TSourceImage::ImageDimension);
00051
00053 typedef MedialNodeTripletCorrespondenceProcess Self;
00054 typedef ProcessObject Superclass;
00055 typedef SmartPointer<Self> Pointer;
00056 typedef SmartPointer<const Self> ConstPointer;
00057
00059 typedef DataObject::Pointer DataObjectPointer;
00060
00062 itkNewMacro(Self);
00063
00065 itkTypeMacro(MedialNodeTripletCorrespondenceProcess, ProcessObject);
00066
00068 typedef TSourceImage CoreAtomImageType;
00069 typedef typename CoreAtomImageType::Pointer CoreAtomImagePointer;
00070 typedef typename CoreAtomImageType::RegionType CoreAtomImageRegionType;
00071 typedef typename CoreAtomImageType::PixelType CoreAtomImagePixelType;
00072 typedef typename CoreAtomImageType::ConstPointer CoreAtomImageConstPointer;
00073
00075 typedef CorrespondingMedialNodeClique<itkGetStaticConstMacro(NDimensions),2> InputNodeType;
00076 typedef CorrespondenceDataStructure<InputNodeType,2> InputDataStructureType;
00077 typedef typename CorrespondenceDataStructure<InputNodeType,2>::Pointer InputDataStructurePointerType;
00078 typedef CorrespondenceDataStructureIterator<InputDataStructureType> InputIteratorType;
00079
00081 typedef CorrespondingMedialNodeClique<itkGetStaticConstMacro(NDimensions),3> OutputNodeType;
00082 typedef CorrespondenceDataStructure<OutputNodeType,3> OutputDataStructureType;
00083 typedef typename CorrespondenceDataStructure<OutputNodeType,3>::Pointer OutputDataStructurePointerType;
00084 typedef CorrespondenceDataStructureIterator<OutputDataStructureType> OutputIteratorType;
00085
00087 typedef MatrixResizeableDataObject<double> DistanceMatrixType;
00088 typedef typename DistanceMatrixType::Pointer DistanceMatrixPointer;
00089
00091 OutputDataStructureType * GetOutput(void);
00092 OutputDataStructureType * GetOutput(unsigned int idx);
00093
00095 void SetPairDataStructure(const InputDataStructureType * InputDataStructure );
00096
00098 void SetCoreAtomImageA( const CoreAtomImageType * CoreAtomImageA );
00099
00101 void SetCoreAtomImageB( const CoreAtomImageType * CoreAtomImageB );
00102
00104 void SetDistanceMatrixA( const DistanceMatrixType * DistanceMatrixA );
00105
00107 void SetDistanceMatrixB( const DistanceMatrixType * DistanceMatrixB );
00108
00110 virtual void Update() {this->GenerateData();}
00111
00112 virtual DataObjectPointer MakeOutput(unsigned int idx);
00113
00115 int GetNumberOfNodeTriplets() {return m_NumberOfTriplets;}
00116 int GetNumberOfNodeTripletBases() {return m_NumberOfNodeBaseTriplets;}
00117
00118 protected:
00119
00120 MedialNodeTripletCorrespondenceProcess();
00121 virtual ~MedialNodeTripletCorrespondenceProcess(){}
00122
00123 void PrintSelf(std::ostream& os, Indent indent) const;
00124
00126 void GenerateData();
00127
00129 TSourceImage * GetCoreAtomImageA();
00130 TSourceImage * GetCoreAtomImageB();
00131
00133 DistanceMatrixType * GetDistanceMatrixA();
00134 DistanceMatrixType * GetDistanceMatrixB();
00135
00136 private:
00137 MedialNodeTripletCorrespondenceProcess(const Self&);
00138 void operator=(const Self&);
00139
00140 CoreAtomImagePointer m_CoreAtomImageA;
00141 CoreAtomImagePointer m_CoreAtomImageB;
00142
00143 DistanceMatrixPointer m_DistanceMatrixA;
00144 DistanceMatrixPointer m_DistanceMatrixB;
00145
00146 InputDataStructurePointerType m_InputDataStructure;
00147 OutputDataStructurePointerType m_OutputDataStructure;
00148
00149 int m_NumberOfTriplets;
00150 int m_NumberOfNodeBaseTriplets;
00151
00152 bool m_CreateOutputFile;
00153 };
00154
00155 }
00156
00157 #ifndef ITK_MANUAL_INSTANTIATION
00158 #include "itkMedialNodeTripletCorrespondenceProcess.txx"
00159 #endif
00160
00161 #endif