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(UseCompression, bool);
00050
00052 itkSetMacro(Quality, int);
00053 itkGetMacro(Quality, int);
00054
00056 itkSetMacro(Progressive, bool);
00057 itkGetMacro(Progressive, bool);
00058
00059
00060
00063 virtual bool CanReadFile(const char*);
00064
00066 virtual void ReadImageInformation();
00067
00069 virtual const std::type_info& GetPixelType() const;
00070
00072 virtual void Read(void* buffer);
00073
00075 virtual void ReadVolume(void* buffer);
00076
00080 virtual unsigned int GetComponentSize() const;
00081
00082
00083
00086 virtual bool CanWriteFile(const char*);
00087
00090 virtual void WriteImageInformation();
00091
00094 virtual void Write(const void* buffer);
00095
00096 protected:
00097 JPEGImageIO();
00098 ~JPEGImageIO();
00099 void PrintSelf(std::ostream& os, Indent indent) const;
00100
00101 void WriteSlice(std::string& fileName, const void* buffer);
00102
00105 bool m_UseCompression;
00108 int m_Quality;
00110 bool m_Progressive;
00111
00112 private:
00113 JPEGImageIO(const Self&);
00114 void operator=(const Self&);
00115
00116
00117 };
00118
00119 }
00120
00121 #endif // __itkJPEGImageIO_h
00122