1 #ifndef CLITKVFIMAGEIO_H
2 #define CLITKVFIMAGEIO_H
5 * @file clitkVfImageIO.h
6 * @author Simon Rit <Simon Rit <simon.rit@gmail.com>>
7 * @date Mon Sep 18 10:13:21 2006
9 * @brief VectorField .vf I/O header
16 #include "clitkCommon.h"
19 #include "itkImageIOBase.h"
23 //====================================================================
24 // Class for reading Vf Image file format
25 class VfImageIO: public itk::ImageIOBase
28 /** Standard class typedefs. */
29 typedef VfImageIO Self;
30 typedef itk::ImageIOBase Superclass;
31 typedef itk::SmartPointer<Self> Pointer;
32 typedef signed short int PixelType;
34 VfImageIO():Superclass() { mustWriteHeader = false; }
36 /** Method for creation through the object factory. */
39 /** Run-time type information (and related methods). */
40 itkTypeMacro(VfImageIO, ImageIOBase);
42 /*-------- This part of the interface deals with reading data. ------ */
43 virtual void ReadImageInformation();
44 virtual bool CanReadFile( const char* FileNameToRead );
45 virtual void Read(void * buffer);
47 /*-------- This part of the interfaces deals with writing data. ----- */
48 virtual void WriteImageInformation(bool keepOfStream);
49 virtual void WriteImageInformation() { WriteImageInformation(false); }
50 virtual bool CanWriteFile(const char* filename);
51 virtual void Write(const void* buffer);
58 }; // end class VfImageIO
62 // explicit template instantiation
63 template class itk::CreateObjectFunction<clitk::VfImageIO>;
65 #endif /* end #define CLITKVFIMAGEIO_H */