# gdcmDecoder.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program: GDCM (Grassroots DICOM). A DICOM library
    00004   Module:  $URL$
    00005
    00006   Copyright (c) 2006-2009 Mathieu Malaterre
    00007   All rights reserved.
    00008   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
    00009
    00010      This software is distributed WITHOUT ANY WARRANTY; without even
    00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00012      PURPOSE.  See the above copyright notice for more information.
    00013
    00014 =========================================================================*/
    00015
    00016 #ifndef __gdcmDecoder_h
    00017 #define __gdcmDecoder_h
    00018
    00019 #include "gdcmTypes.h"
    00020 #include "gdcmDataElement.h" // FIXME
    00021
    00022 namespace gdcm
    00023 {
    00024
    00025 class TransferSyntax;
    00026 class DataElement;
    00030 class GDCM_EXPORT Decoder
    00031 {
    00032 public:
    00033   virtual ~Decoder() {}
    00034
    00036   virtual bool CanDecode(TransferSyntax const &) const = 0;
    00037
    00039   virtual bool Decode(DataElement const &is, DataElement &os) { (void)is;(void)os;return false; }
    00040 protected:
    00041   virtual bool Decode(std::istream &is, std::ostream &os) { (void)is; (void)os;return false; }
    00042 };
    00043
    00044 } // end namespace gdcm
    00045
    00046 #endif //__gdcmDecoder_h