GDCM
2.2.3
|
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 GDCMPRESENTATIONCONTEXTAC_H 00015 #define GDCMPRESENTATIONCONTEXTAC_H 00016 00017 #include "gdcmTypes.h" 00018 #include "gdcmTransferSyntaxSub.h" 00019 00020 namespace gdcm 00021 { 00022 00023 namespace network 00024 { 00025 00032 class PresentationContextAC 00033 { 00034 public: 00035 PresentationContextAC(); 00036 std::istream &Read(std::istream &is); 00037 const std::ostream &Write(std::ostream &os) const; 00038 00039 size_t Size() const; 00040 00041 void SetTransferSyntax( TransferSyntaxSub const &ts ); 00042 void SetPresentationContextID( uint8_t id ); 00043 00044 void Print(std::ostream &os) const; 00045 00046 uint8_t GetPresentationContextID() const 00047 { 00048 return ID; 00049 } 00050 TransferSyntaxSub const & GetTransferSyntax() const { return SubItems; } 00051 00052 void SetReason( uint8_t r ) { Result = r; } 00053 uint8_t GetReason() const { return Result; } 00054 00055 private: 00056 static const uint8_t ItemType; 00057 static const uint8_t Reserved2; 00058 uint16_t ItemLength; // len of last transfer syntax 00059 uint8_t /*PresentationContext*/ID; 00060 static const uint8_t Reserved6; 00061 uint8_t /*Reason*/Result; 00062 static const uint8_t Reserved8; 00063 TransferSyntaxSub SubItems; 00064 }; 00065 00066 } // end namespace network 00067 00068 } // end namespace gdcm 00069 00070 #endif //GDCMPRESENTATIONCONTEXTAC_H