GDCM: gdcmPresentationContextGenerator.h Source File

GDCM 3.2.5

gdcmPresentationContextGenerator.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 GDCMPRESENTATIONCONTEXTGENERATOR_H
15#define GDCMPRESENTATIONCONTEXTGENERATOR_H
16
17#include "gdcmDirectory.h"
18#include "gdcmPresentationContext.h"
19
20namespace gdcm
21{
22class TransferSyntax;
23class File;
24
53 class GDCM_EXPORT PresentationContextGenerator
54{
55public:
56 PresentationContextGenerator();
57
58 // Set MergeMode
59 // Default mode, each pair AbstractSyntax/TransferSyntax are only merged when
60 // exactly identical
61 void SetMergeModeToAbstractSyntax();
62
63 // Set MergeMode
64 // Merge is done on a per AbstractSyntax basis. Any new TransferSyntax for a
65 // given AbstractSyntax is merge to the existing PresentationContext referring
66 // to that AbstractSyntax
67 void SetMergeModeToTransferSyntax();
68
70 bool GenerateFromUID(UIDs::TSName asname);
71
75 bool GenerateFromFilenames(const Directory::FilenamesType &files);
76
79 bool AddFromFile(const File &file);
80
81 typedef std::vector<PresentationContext> PresentationContextArrayType;
82 typedef PresentationContextArrayType::size_type SizeType;
83 PresentationContextArrayType const &GetPresentationContexts() { return PresContext; }
84
86 void SetDefaultTransferSyntax( const TransferSyntax &ts );
87protected:
88 bool AddPresentationContext( const char *absyn, const char *ts );
89 const char *GetDefaultTransferSyntax() const;
90
91private:
92 std::vector<PresentationContext> PresContext;
93 static std::string DefaultTransferSyntax;
94};
95
96} // end namespace gdcm
97
98#endif //GDCMPRESENTATIONCONTEXTGENERATOR_H
gdcm::Directory::FilenamesType
std::vector< FilenameType > FilenamesType
Definition gdcmDirectory.h:49
gdcm::File
a DICOM File
Definition gdcmFile.h:34
gdcm::PresentationContextGenerator::SetMergeModeToAbstractSyntax
void SetMergeModeToAbstractSyntax()
gdcm::PresentationContextGenerator::PresentationContextArrayType
std::vector< PresentationContext > PresentationContextArrayType
Definition gdcmPresentationContextGenerator.h:81
gdcm::PresentationContextGenerator::GenerateFromUID
bool GenerateFromUID(UIDs::TSName asname)
Generate the PresentationContext array from a UID (eg. VerificationSOPClass).
gdcm::PresentationContextGenerator::PresentationContextGenerator
PresentationContextGenerator()
gdcm::PresentationContextGenerator::GenerateFromFilenames
bool GenerateFromFilenames(const Directory::FilenamesType &files)
gdcm::PresentationContextGenerator::SetMergeModeToTransferSyntax
void SetMergeModeToTransferSyntax()
gdcm::PresentationContextGenerator::GetDefaultTransferSyntax
const char * GetDefaultTransferSyntax() const
gdcm::PresentationContextGenerator::AddFromFile
bool AddFromFile(const File &file)
gdcm::PresentationContextGenerator::SetDefaultTransferSyntax
void SetDefaultTransferSyntax(const TransferSyntax &ts)
Not implemented for now. GDCM internally uses Implicit Little Endian.
gdcm::PresentationContextGenerator::GetPresentationContexts
PresentationContextArrayType const & GetPresentationContexts()
Definition gdcmPresentationContextGenerator.h:83
gdcm::PresentationContextGenerator::SizeType
PresentationContextArrayType::size_type SizeType
Definition gdcmPresentationContextGenerator.h:82
gdcm::PresentationContextGenerator::AddPresentationContext
bool AddPresentationContext(const char *absyn, const char *ts)
gdcm::TransferSyntax
Class to manipulate Transfer Syntax.
Definition gdcmTransferSyntax.h:40
gdcm::UIDs::TSName
TSName
Definition gdcmUIDs.h:501
gdcmDirectory.h
gdcmPresentationContext.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21