Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkCoreAtomImageToUnaryCorrespondenceMatrixProcess.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkCoreAtomImageToUnaryCorrespondenceMatrixProcess.h,v $
00005   Language:  C++
00006   Date:      $Date: 2003/09/10 14:28:29 $
00007   Version:   $Revision: 1.3 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkCoreAtomImageToUnaryCorrespondenceMatrixProcess_h
00018 #define __itkCoreAtomImageToUnaryCorrespondenceMatrixProcess_h
00019 
00020 #include "itkImage.h"
00021 #include "itkProcessObject.h"
00022 #include "itkDataObject.h"
00023 #include "vnl/vnl_matrix.h"
00024 #include "itkBloxCoreAtomImage.h"
00025 #include "itkBloxCoreAtomPixel.h"
00026 #include "itkMatrixResizeableDataObject.h"
00027 #include "itkUnaryMedialNodeMetric.h"
00028 #include "itkImageFileWriter.h"
00029 #include "itkPNGImageIO.h"
00030 
00031 namespace itk
00032 {
00033   
00042 template< typename TSourceImage >
00043 class CoreAtomImageToUnaryCorrespondenceMatrixProcess : public ProcessObject
00044 {
00045 public:
00047   itkStaticConstMacro(NDimensions, unsigned int, TSourceImage::ImageDimension);
00048 
00050   typedef CoreAtomImageToUnaryCorrespondenceMatrixProcess  Self;
00051   typedef ProcessObject Superclass;
00052   typedef SmartPointer<Self>   Pointer;
00053   typedef SmartPointer<const Self>  ConstPointer;
00054 
00056   typedef DataObject::Pointer DataObjectPointer;
00057 
00059   itkNewMacro(Self);
00060 
00062   itkTypeMacro(CoreAtomImageToUnaryCorrespondenceMatrixProcess, ProcessObject);
00063 
00065   itkGetMacro(Rows, int);
00066   itkGetMacro(Columns, int);
00068 
00070   typedef TSourceImage CoreAtomImageType;
00071   typedef typename CoreAtomImageType::Pointer CoreAtomImagePointer;
00072   typedef typename CoreAtomImageType::RegionType CoreAtomImageRegionType; 
00073   typedef typename CoreAtomImageType::PixelType CoreAtomImagePixelType; 
00074   typedef typename CoreAtomImageType::ConstPointer CoreAtomImageConstPointer;
00075 
00077   typedef MatrixResizeableDataObject<double> CorrespondenceMatrixType;
00078   typedef typename CorrespondenceMatrixType::Pointer CorrespondenceMatrixPointer;
00079 
00081   typedef BloxCoreAtomPixel<itkGetStaticConstMacro(NDimensions)> MedialNodeType;
00082 
00084   typedef UnaryMedialNodeMetric<itkGetStaticConstMacro(NDimensions)> UnaryMetricType;
00085   typedef typename UnaryMedialNodeMetric<itkGetStaticConstMacro(NDimensions)>::Pointer UnaryMetricPointer;
00087 
00089   CorrespondenceMatrixType * GetOutput(void);
00090   CorrespondenceMatrixType * GetOutput(unsigned int idx);
00092 
00094   void SetInput1( const CoreAtomImageType * CoreAtomImageA );
00095 
00097   void SetInput2( const CoreAtomImageType * CoreAtomImageB );
00098 
00100   virtual void Update() {this->GenerateData();}
00101 
00102   virtual DataObjectPointer MakeOutput(unsigned int idx);
00103 
00104 protected:
00105   CoreAtomImageToUnaryCorrespondenceMatrixProcess();
00106   virtual ~CoreAtomImageToUnaryCorrespondenceMatrixProcess(){}
00107 
00108   void PrintSelf(std::ostream& os, Indent indent) const;
00109 
00111   void GenerateData();
00112 
00114   TSourceImage * GetInput1();
00115   TSourceImage * GetInput2();
00117 
00118 private:
00119   CoreAtomImageToUnaryCorrespondenceMatrixProcess(const Self&); //purposely not implemented
00120   void operator=(const Self&); //purposely not implemented
00121 
00122   CoreAtomImagePointer m_CoreAtomImageA;
00123   CoreAtomImagePointer m_CoreAtomImageB;
00124 
00125   int m_Rows;
00126   int m_Columns;
00127 
00128   CorrespondenceMatrixPointer m_CorrespondenceMatrix;
00129 
00130   UnaryMetricPointer m_Metric;
00131 
00133   bool m_OutputPNG;
00134 };
00135 
00136 } // end namespace itk
00137 
00138 #ifndef ITK_MANUAL_INSTANTIATION
00139 #include "itkCoreAtomImageToUnaryCorrespondenceMatrixProcess.txx"
00140 #endif
00141 
00142 #endif
00143 

Generated at Tue Jul 29 19:40:02 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000