freImageTypes.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   F.R.E.E. - flexible registration evaluation engine
00004   Version:   v.1.0.0
00005   Date:      $Date: 2006/09/01 12:00:00 $
00006   Module:    $RCSfile: freImageTypes.h,v $
00007   Language:  C++
00008 
00009 
00010 
00011   Copyright (c) 2007 Ralf o Floca (Department of Medical Informatics,
00012   Institute for Medical Biometry and Informatics, University of Heidelberg,
00013   Germany). All rights reserved.
00014   See FREECopyright.txt or http://www.mi.med.uni-hd.de/free/copyright.htm
00015   for details.
00016 
00017      This software is distributed WITHOUT ANY WARRANTY; without even 
00018      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00019      PURPOSE.  See the above copyright notices for more information.
00020 
00021 =========================================================================*/
00022 #ifndef __freImageTypes_h
00023 #define __freImageTypes_h
00024 
00025 #include "freElementals.h"
00026 
00027 #include "itkImage.h"
00028 #include "itkVector.h"
00029 #include "itkPointSet.h"
00030 
00031 namespace FREE
00032 {
00033 
00034 
00035 /* Different pixel types used by the image types */
00036 typedef PixelType InternalImagePixelType;
00037 
00040 typedef unsigned char ViewImagePixelType;
00041 
00043 typedef ViewImagePixelType MaskPixelType;
00044 
00049 template < unsigned int VImageDimension >
00050 class ImageTypes
00051 {
00052 public:
00054   typedef itk::Vector<ScalarType, VImageDimension> VectorType;
00055   
00056         typedef VectorType TransformationFieldPixelType;
00057 
00059   typedef itk::Image<InternalImagePixelType, VImageDimension> InternalImageType;
00060 
00063   typedef itk::Image<TransformationFieldPixelType , VImageDimension> TransformationFieldType;
00064 
00066         typedef itk::Image<ViewImagePixelType, VImageDimension> ViewImageType;
00067 
00070   typedef itk::Image<MaskPixelType, VImageDimension> MaskType;
00071 
00073   typedef itk::Point<ScalarType, VImageDimension > PointType;
00074 
00075         typedef itk::PointSet< InternalImagePixelType, VImageDimension, itk::DefaultStaticMeshTraits<InternalImagePixelType, VImageDimension, VImageDimension, ScalarType> > PointSetType;
00076 };
00077 
00078 
00080 typedef ImageTypes<2>::VectorType Vector2DType;
00081 typedef ImageTypes<3>::VectorType Vector3DType;
00082 
00084 typedef ImageTypes<2>::InternalImageType InternalImage2DType;
00086 typedef ImageTypes<3>::InternalImageType InternalImage3DType;
00087 
00090 typedef ImageTypes<2>::TransformationFieldType TransformationField2DType;
00093 typedef ImageTypes<3>::TransformationFieldType TransformationField3DType;
00094 
00097 typedef ImageTypes<2>::ViewImageType ViewImage2DType;
00100 typedef ImageTypes<3>::ViewImageType ViewImage3DType;
00101 
00105 typedef ImageTypes<2>::MaskType Mask2DType;
00109 typedef ImageTypes<3>::MaskType Mask3DType;
00110 
00112 typedef ImageTypes<2>::PointType Point2DType;
00114 typedef ImageTypes<3>::PointType Point3DType;
00115 
00116 template < class TImageType >
00117 class DefaultImages
00118 {
00119 public:
00120         typedef TImageType ImageType;
00121         typedef typename ImageType::Pointer ImagePointer;
00122         typedef typename ImageType::PixelType PixelType;
00123         typedef typename ImageType::RegionType RegionType;
00124         typedef typename ImageType::SpacingType SpacingType;
00125 
00126         static ImagePointer CreateGridImage(const RegionType& imageRegion, const SpacingType& imageSpacing,
00127                                                                                                                                                                         const PixelType& gridValue,     const PixelType& backValue,
00128                                                                                                                                                                         const unsigned int& iGridSize);
00129 };
00130 
00131 }//End of Namespace free
00132 
00133 #ifndef ITK_MANUAL_INSTANTIATION
00134 #include "freImageTypes.txx"
00135 #endif
00136 
00137 #endif

Generated at Sat Oct 13 16:09:47 2007 for f.r.e.e. - Flexible Registration and Evaluation Engine by doxygen 1.5.3 written by Dimitri van Heesch, © 1997-2000