itkMedialNodeTripletCorrespondenceProcess.h
Go to the documentation of this file.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;
00080
00082 typedef CorrespondingMedialNodeClique<itkGetStaticConstMacro(NDimensions),3> OutputNodeType;
00083 typedef CorrespondenceDataStructure<OutputNodeType,3> OutputDataStructureType;
00084 typedef typename CorrespondenceDataStructure<OutputNodeType,3>::Pointer OutputDataStructurePointerType;
00085 typedef CorrespondenceDataStructureIterator<OutputDataStructureType> OutputIteratorType;
00087
00089 typedef MatrixResizeableDataObject<double> DistanceMatrixType;
00090 typedef typename DistanceMatrixType::Pointer DistanceMatrixPointer;
00091
00093 OutputDataStructureType * GetOutput(void);
00094 OutputDataStructureType * GetOutput(unsigned int idx);
00096
00098 void SetPairDataStructure(const InputDataStructureType * InputDataStructure );
00099
00101 void SetCoreAtomImageA( const CoreAtomImageType * CoreAtomImageA );
00102
00104 void SetCoreAtomImageB( const CoreAtomImageType * CoreAtomImageB );
00105
00107 void SetDistanceMatrixA( const DistanceMatrixType * DistanceMatrixA );
00108
00110 void SetDistanceMatrixB( const DistanceMatrixType * DistanceMatrixB );
00111
00113 virtual void Update() {this->GenerateData();}
00114
00115 virtual DataObjectPointer MakeOutput(unsigned int idx);
00116
00118 int GetNumberOfNodeTriplets() {return m_NumberOfTriplets;}
00119 int GetNumberOfNodeTripletBases() {return m_NumberOfNodeBaseTriplets;}
00121
00122 protected:
00123
00124 MedialNodeTripletCorrespondenceProcess();
00125 virtual ~MedialNodeTripletCorrespondenceProcess(){}
00126
00127 void PrintSelf(std::ostream& os, Indent indent) const;
00128
00130 void GenerateData();
00131
00133 TSourceImage * GetCoreAtomImageA();
00134 TSourceImage * GetCoreAtomImageB();
00136
00138 DistanceMatrixType * GetDistanceMatrixA();
00139 DistanceMatrixType * GetDistanceMatrixB();
00141
00142 private:
00143 MedialNodeTripletCorrespondenceProcess(const Self&);
00144 void operator=(const Self&);
00145
00146 CoreAtomImagePointer m_CoreAtomImageA;
00147 CoreAtomImagePointer m_CoreAtomImageB;
00148
00149 DistanceMatrixPointer m_DistanceMatrixA;
00150 DistanceMatrixPointer m_DistanceMatrixB;
00151
00152 InputDataStructurePointerType m_InputDataStructure;
00153 OutputDataStructurePointerType m_OutputDataStructure;
00154
00155 int m_NumberOfTriplets;
00156 int m_NumberOfNodeBaseTriplets;
00157
00158 bool m_CreateOutputFile;
00159 };
00160
00161 }
00162
00163 #ifndef ITK_MANUAL_INSTANTIATION
00164 #include "itkMedialNodeTripletCorrespondenceProcess.txx"
00165 #endif
00166
00167 #endif
00168