/vol/vipdata/irtk/image++/include/irtkImageToFile.h

00001 /*=========================================================================
00002 
00003   Library   : Image Registration Toolkit (IRTK)
00004   Module    : $Id: irtkImageToFile.h 8 2009-03-02 16:12:58Z dr $
00005   Copyright : Imperial College, Department of Computing
00006               Visual Information Processing (VIP), 2008 onwards
00007   Date      : $Date: 2009-03-02 16:12:58 +0000 (Mon, 02 Mar 2009) $
00008   Version   : $Revision: 8 $
00009   Changes   : $Author: dr $
00010 
00011 =========================================================================*/
00012 
00013 #ifndef _IRTKIMAGETOFILE_H
00014 
00015 #define _IRTKIMAGETOFILE_H
00016 
00017 #include <irtkFileToImage.h>
00018 
00027 class irtkImageToFile : protected irtkCofstream
00028 {
00029 
00030 protected:
00031 
00033   irtkImage *_input;
00034 
00035   // Pointer to filename for output
00036   char *_output;
00037 
00041   int _start;
00042 
00044   int _reflectX;
00045 
00047   int _reflectY;
00048 
00050   int _reflectZ;
00051 
00053   virtual void Initialize();
00054 
00056   virtual void Finalize();
00057 
00058 public:
00059 
00061   irtkImageToFile();
00062 
00064   virtual ~irtkImageToFile();
00065 
00071   static irtkImageToFile *New(const char *);
00072 
00074   virtual void SetInput (irtkImage *);
00075 
00077   virtual void SetOutput(const char *);
00078 
00080   virtual void Run();
00081 
00083   virtual const char *NameOfClass() = 0;
00084 };
00085 
00086 #include <irtkImageToFilePGM.h>
00087 #include <irtkImageToFilePNG.h>
00088 #include <irtkImageToFileVTK.h>
00089 #include <irtkImageToFileGIPL.h>
00090 #include <irtkImageToFileANALYZE.h>
00091 #ifdef HAS_NIFTI
00092 #include <irtkImageToFileNIFTI.h>
00093 #endif
00094 
00095 #endif