GDCM 3.0.24
gdcmDictConverter.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
15#ifndef GDCMDICTCONVERTER_H
16#define GDCMDICTCONVERTER_H
17
18#include "gdcmTypes.h"
19#include "gdcmVR.h"
20#include "gdcmVM.h"
21
22#include <string>
23
24namespace gdcm
25{
26
27class DictConverterInternal;
37{
38public:
41 void SetInputFileName(const char* filename);
42 const std::string &GetInputFilename() const;
43 void SetOutputFileName(const char* filename);
44 const std::string &GetOutputFilename() const;
45
46 int GetOutputType() const {
47 return OutputType;
48 }
49 void SetOutputType(int type) {
50 OutputType = type;
51 }
52 const std::string &GetDictName() const;
53 void SetDictName(const char *name);
54
55 void Convert();
56
57 // Leaving them public for now. Not really user oriented but may be
58 // useful
59 static bool ReadVR(const char *raw, VR::VRType &type);
60 static bool ReadVM(const char *raw, VM::VMType &type);
61 static bool Readuint16(const char *raw, uint16_t &ov);
62
64 DICT_DEFAULT = 0,
66 DICT_XML
67 };
68
69protected:
72 bool ConvertToXML(const char *raw, std::string &cxx);
73 bool ConvertToCXX(const char *raw, std::string &cxx);
75
76private:
77 DictConverterInternal *Internal;
78
79 int OutputType;
80};
81
82} // end namespace gdcm
83
84#endif //GDCMDICTCONVERTER_H
Class to convert a .dic file into something else:
Definition gdcmDictConverter.h:37
static bool ReadVR(const char *raw, VR::VRType &type)
void SetOutputType(int type)
Definition gdcmDictConverter.h:49
const std::string & GetOutputFilename() const
static bool ReadVM(const char *raw, VM::VMType &type)
void SetInputFileName(const char *filename)
void SetDictName(const char *name)
void SetOutputFileName(const char *filename)
const std::string & GetDictName() const
bool ConvertToXML(const char *raw, std::string &cxx)
int GetOutputType() const
Definition gdcmDictConverter.h:46
OutputTypes
Definition gdcmDictConverter.h:63
@ DICT_DEBUG
Definition gdcmDictConverter.h:65
static bool Readuint16(const char *raw, uint16_t &ov)
const std::string & GetInputFilename() const
bool ConvertToCXX(const char *raw, std::string &cxx)
VMType
Definition gdcmVM.h:70
VRType
Definition gdcmVR.h:57
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21