GDCM 3.2.1

gdcmCoder.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13=========================================================================*/
14#ifndef GDCMCODER_H
15#define GDCMCODER_H
16
17#include "gdcmTypes.h"
18#include "gdcmDataElement.h" // FIXME
19
20 namespace gdcm
21{
22
23 class TransferSyntax;
24 class DataElement;
28 class GDCM_EXPORT Coder
29{
30 public:
31 virtual ~Coder() = default;
32
34 virtual bool CanCode(TransferSyntax const &) const = 0;
35
36 // Note: in / out are reserved keyword in C#. Change to in_ / out_
37
39 virtual bool Code(DataElement const &in_, DataElement &out_) { (void)in_; (void)out_; return false; }
40 protected:
41 virtual bool InternalCode(const char *bv, unsigned long len, std::ostream &os) { (void)bv;(void)os;(void)len;return false; }
42};
43
44} // end namespace gdcm
45
46#endif //GDCMCODER_H
gdcm::Coder
Coder.
Definition gdcmCoder.h:29
gdcm::Coder::~Coder
virtual ~Coder()=default
gdcm::Coder::Code
virtual bool Code(DataElement const &in_, DataElement &out_)
Code.
Definition gdcmCoder.h:39
gdcm::Coder::InternalCode
virtual bool InternalCode(const char *bv, unsigned long len, std::ostream &os)
Definition gdcmCoder.h:41
gdcm::Coder::CanCode
virtual bool CanCode(TransferSyntax const &) const =0
Return whether this coder support this transfer syntax (can code it)
gdcm::DataElement
Class to represent a Data Element either Implicit or Explicit.
Definition gdcmDataElement.h:59
gdcm::TransferSyntax
Class to manipulate Transfer Syntax.
Definition gdcmTransferSyntax.h:40
gdcmDataElement.h
gdcmTypes.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21