GDCM 2.2.0

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

- File List
- File Members

gdcmPresentationContextAC.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 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 private:
    00053   static const uint8_t ItemType;
    00054   static const uint8_t Reserved2;
    00055   uint16_t ItemLength; // len of last transfer syntax
    00056   uint8_t /*PresentationContext*/ID;
    00057   static const uint8_t Reserved6;
    00058   uint8_t /*Reason*/Result;
    00059   static const uint8_t Reserved8;
    00060   TransferSyntaxSub SubItems;
    00061 };
    00062
    00063 } // end namespace network
    00064
    00065 } // end namespace gdcm
    00066
    00067 #endif //GDCMPRESENTATIONCONTEXTAC_H