GDCM  2.2.3
gdcmPresentationContextGenerator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program: GDCM (Grassroots DICOM). A DICOM library
00004 
00005   Copyright (c) 2006-2011 Mathieu Malaterre
00006   All rights reserved.
00007   See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
00008 
00009      This software is distributed WITHOUT ANY WARRANTY; without even
00010      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00011      PURPOSE.  See the above copyright notice for more information.
00012 
00013 =========================================================================*/
00014 #ifndef GDCMPRESENTATIONCONTEXTGENERATOR_H
00015 #define GDCMPRESENTATIONCONTEXTGENERATOR_H
00016 
00017 #include "gdcmDirectory.h"
00018 #include "gdcmPresentationContext.h"
00019 
00020 namespace gdcm
00021 {
00022 class TransferSyntax;
00023 
00052 class GDCM_EXPORT PresentationContextGenerator
00053 {
00054 public:
00055   PresentationContextGenerator();
00056 
00057   // Set MergeMode
00058   // Default mode, each pair AbstractSyntax/TransferSyntax are only merged when
00059   // exactly identical
00060   void SetMergeModeToAbstractSyntax();
00061 
00062   // Set MergeMode
00063   // Merge is done on a per AbstractSyntax basis. Any new TransferSyntax for a
00064   // given AbstractSyntax is merge to the existing PresentationContext refering
00065   // to that AbstractSyntax
00066   void SetMergeModeToTransferSyntax();
00067 
00069   bool GenerateFromUID(UIDs::TSName asname);
00070 
00074   bool GenerateFromFilenames(const Directory::FilenamesType &files);
00075 
00076   typedef std::vector<PresentationContext> PresentationContextArrayType;
00077   typedef PresentationContextArrayType::size_type SizeType;
00078   PresentationContextArrayType const &GetPresentationContexts() { return PresContext; }
00079 
00081   void SetDefaultTransferSyntax( const TransferSyntax &ts );
00082 protected:
00083   bool AddPresentationContext( const char *as, const char *ts );
00084   const char *GetDefaultTransferSyntax() const;
00085 
00086 private:
00087   std::vector<PresentationContext> PresContext;
00088   static std::string DefaultTransferSyntax;
00089 };
00090 
00091 } // end namespace gdcm
00092 
00093 #endif //GDCMPRESENTATIONCONTEXTGENERATOR_H

Generated on Thu Nov 28 2013 07:02:50 for GDCM by doxygen 1.7.6.1
SourceForge.net Logo