GDCM  2.0.18
gdcmPNMCodec.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program: GDCM (Grassroots DICOM). A DICOM library
00004 
00005   Copyright (c) 2006-2011 Mathieu Malaterre
00006   All rights reserved.
00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 #ifndef GDCMPNMCODEC_H
00015 #define GDCMPNMCODEC_H
00016 
00017 #include "gdcmImageCodec.h"
00018 
00019 namespace gdcm
00020 {
00021 
00029 class GDCM_EXPORT PNMCodec : public ImageCodec
00030 {
00031 public:
00032   PNMCodec();
00033   ~PNMCodec();
00034   bool CanDecode(TransferSyntax const &ts) const;
00035   bool CanCode(TransferSyntax const &ts) const;
00036 
00037   unsigned long GetBufferLength() const { return BufferLength; }
00038   void SetBufferLength(unsigned long l) { BufferLength = l; }
00039 
00040   bool GetHeaderInfo(std::istream &is, TransferSyntax &ts);
00041 
00042   bool Read(const char *filename, DataElement &out) const;
00043   bool Write(const char *filename, const DataElement &out) const;
00044   //bool Write(const char *filename);
00045 private:
00046   unsigned long BufferLength;
00047 };
00048 
00049 } // end namespace gdcm
00050 
00051 #endif //GDCMPNMCODEC_H

Generated on Tue Dec 6 2011 20:36:27 for GDCM by doxygen 1.7.5.1
SourceForge.net Logo