GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

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
20 namespace gdcm
21 {
22 class TransferSyntax;
23
52 class GDCM_EXPORT PresentationContextGenerator
53 {
54 public:
55 PresentationContextGenerator();
56
57 // Set MergeMode
58 // Default mode, each pair AbstractSyntax/TransferSyntax are only merged when
59 // exactly identical
60 void SetMergeModeToAbstractSyntax();
61
62 // Set MergeMode
63 // Merge is done on a per AbstractSyntax basis. Any new TransferSyntax for a
64 // given AbstractSyntax is merge to the existing PresentationContext refering
65 // to that AbstractSyntax
66 void SetMergeModeToTransferSyntax();
67
69 bool GenerateFromUID(UIDs::TSName asname);
70
74 bool GenerateFromFilenames(const Directory::FilenamesType &files);
75
76 typedef std::vector<PresentationContext> PresentationContextArrayType;
77 typedef PresentationContextArrayType::size_type SizeType;
78 PresentationContextArrayType const &GetPresentationContexts() { return PresContext; }
79
81 void SetDefaultTransferSyntax( const TransferSyntax &ts );
82 protected:
83 bool AddPresentationContext( const char *as, const char *ts );
84 const char *GetDefaultTransferSyntax() const;
85
86 private:
87 std::vector<PresentationContext> PresContext;
88 static std::string DefaultTransferSyntax;
89 };
90
91 } // end namespace gdcm
92
93 #endif //GDCMPRESENTATIONCONTEXTGENERATOR_H