00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkJPEGImageIO_h
00018 #define __itkJPEGImageIO_h
00019
00020 #ifdef _MSC_VER
00021 #pragma warning ( disable : 4786 )
00022 #endif
00023
00024 #include "itkImageIOBase.h"
00025
00026 namespace itk
00027 {
00028
00029
00030
00031
00032
00033
00034 class ITK_EXPORT JPEGImageIO : public ImageIOBase
00035 {
00036 public:
00038 typedef JPEGImageIO Self;
00039 typedef ImageIOBase Superclass;
00040 typedef SmartPointer<Self> Pointer;
00041
00043 itkNewMacro(Self);
00044
00046 itkTypeMacro(JPEGImageIO, ImageIOBase);
00047
00049 itkSetMacro(Quality, int);
00050 itkGetMacro(Quality, int);
00051
00053 itkSetMacro(Progressive, bool);
00054 itkGetMacro(Progressive, bool);
00055
00056
00057
00060 virtual bool CanReadFile(const char*);
00061
00063 virtual void ReadImageInformation();
00064
00066 virtual void Read(void* buffer);
00067
00069 virtual void ReadVolume(void* buffer);
00070
00071
00072
00075 virtual bool CanWriteFile(const char*);
00076
00079 virtual void WriteImageInformation();
00080
00083 virtual void Write(const void* buffer);
00084
00085 protected:
00086 JPEGImageIO();
00087 ~JPEGImageIO();
00088 void PrintSelf(std::ostream& os, Indent indent) const;
00089
00090 void WriteSlice(std::string& fileName, const void* buffer);
00091
00094 int m_Quality;
00096 bool m_Progressive;
00097
00098 private:
00099 JPEGImageIO(const Self&);
00100 void operator=(const Self&);
00101
00102
00103 };
00104
00105 }
00106
00107 #endif // __itkJPEGImageIO_h
00108