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: 2009-05-12 17:26:20 $
00007   Version:   $Revision: 1.6 $
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 ITK_EXPORT 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   itkGetConstMacro(Rows, int);
00066   itkGetConstMacro(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)>
00085                                            UnaryMetricType;
00086   typedef typename UnaryMedialNodeMetric<itkGetStaticConstMacro(NDimensions)>::Pointer
00087                                            UnaryMetricPointer;
00089 
00091   CorrespondenceMatrixType * GetOutput(void);
00092   CorrespondenceMatrixType * GetOutput(unsigned int idx);
00094 
00096   void SetInput1( const CoreAtomImageType * CoreAtomImageA );
00097 
00099   void SetInput2( const CoreAtomImageType * CoreAtomImageB );
00100 
00102   virtual void Update() {this->GenerateData();}
00103 
00104   virtual DataObjectPointer MakeOutput(unsigned int idx);
00105 
00106 protected:
00107   CoreAtomImageToUnaryCorrespondenceMatrixProcess();
00108   virtual ~CoreAtomImageToUnaryCorrespondenceMatrixProcess(){}
00109 
00110   void PrintSelf(std::ostream& os, Indent indent) const;
00111 
00113   void GenerateData();
00114 
00116   TSourceImage * GetInput1();
00117   TSourceImage * GetInput2();
00119 
00120 private:
00121   CoreAtomImageToUnaryCorrespondenceMatrixProcess(const Self&); //purposely not implemented
00122   void operator=(const Self&); //purposely not implemented
00123 
00124   CoreAtomImagePointer m_CoreAtomImageA;
00125   CoreAtomImagePointer m_CoreAtomImageB;
00126 
00127   int m_Rows;
00128   int m_Columns;
00129 
00130   CorrespondenceMatrixPointer m_CorrespondenceMatrix;
00131   UnaryMetricPointer          m_Metric;
00132 
00134   bool m_OutputPNG;
00135 };
00136 
00137 } // end namespace itk
00138 
00139 #ifndef ITK_MANUAL_INSTANTIATION
00140 #include "itkCoreAtomImageToUnaryCorrespondenceMatrixProcess.txx"
00141 #endif
00142 
00143 #endif
00144 

Generated at Tue Sep 15 02:41:44 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000