GDCM: gdcm::PresentationContextGenerator Class Reference

GDCM 3.2.10

Public Types | Public Member Functions | Protected Member Functions | List of all members
gdcm::PresentationContextGenerator Class Reference

PresentationContextGenerator. More...

`#include <gdcmPresentationContextGenerator.h>`

## Public Types
typedef std::vector< PresentationContext > | PresentationContextArrayType
typedef PresentationContextArrayType::size_type | SizeType

## Public Member Functions
| PresentationContextGenerator ()
bool | AddFromFile (const File &file)
bool | GenerateFromFilenames (const Directory::FilenamesType &files)
bool | GenerateFromUID (UIDs::TSName asname)
| Generate the PresentationContext array from a UID (eg. VerificationSOPClass).
PresentationContextArrayType const & | GetPresentationContexts ()
void | SetDefaultTransferSyntax (const TransferSyntax &ts)
| Not implemented for now. GDCM internally uses Implicit Little Endian.
void | SetMergeModeToAbstractSyntax ()
void | SetMergeModeToTransferSyntax ()

## Protected Member Functions
bool | AddPresentationContext (const char *absyn, const char *ts)
const char * | GetDefaultTransferSyntax () const

## Detailed Description

PresentationContextGenerator.

This class is responsible for generating the proper PresentationContext that will be used in subsequent operation during a DICOM Query/Retrieve association. The step of the association is very sensible as special care need to be taken to explicitly define what instance are going to be send and how they are encoded.

For example a PresentationContext will express that negotiation requires that CT Image Storage are send using JPEG Lossless, while US Image Storage are sent using RLE Transfer Syntax.

Two very different API are exposed one which will always default to little endian transfer syntax see GenerateFromUID() This API is used for C-ECHO, C-FIND and C-MOVE (SCU). Another API: GenerateFromFilenames() is used for C-STORE (SCU) as it will loop over all filenames argument to detect the actual encoding. and therefore find the proper encoding to be used.

Two modes are available. The default mode (SetMergeModeToAbstractSyntax) append PresentationContext (one AbstractSyntax and one TransferSyntax), as long a they are different. Eg MR Image Storage/JPEG2000 and MR Image Storage/JPEGLossless would be considered different. the other mode SetMergeModeToTransferSyntax merge any new TransferSyntax to the already existing PresentationContext in order to re-use the same AbstractSyntax.

See also
  PresentationContext

Examples
  CStoreQtProgress.cxx.

## Member Typedef Documentation

## ◆ PresentationContextArrayType

typedef std::vector<PresentationContext> gdcm::PresentationContextGenerator::PresentationContextArrayType

## ◆ SizeType

typedef PresentationContextArrayType::size_type gdcm::PresentationContextGenerator::SizeType

## Constructor & Destructor Documentation

## ◆ PresentationContextGenerator()

gdcm::PresentationContextGenerator::PresentationContextGenerator | ( |  | ) |

## Member Function Documentation

## ◆ AddFromFile()

bool gdcm::PresentationContextGenerator::AddFromFile | ( | const File & | file | ) |

Add a single PresentationContext from a single File. Call multiple times when dealing with multiple files.

## ◆ AddPresentationContext()

bool gdcm::PresentationContextGenerator::AddPresentationContext | ( | const char * | absyn,
|  | const char * | ts )
| protected

## ◆ GenerateFromFilenames()

bool gdcm::PresentationContextGenerator::GenerateFromFilenames | ( | const Directory::FilenamesType & | files | ) |

Generate the PresentationContext array from a File-Set. File specified needs to be valid DICOM files. Used for C-STORE operations

Examples
  CStoreQtProgress.cxx.

## ◆ GenerateFromUID()

bool gdcm::PresentationContextGenerator::GenerateFromUID | ( | UIDs::TSName | asname | ) |

Generate the PresentationContext array from a UID (eg. VerificationSOPClass).

## ◆ GetDefaultTransferSyntax()

const char * gdcm::PresentationContextGenerator::GetDefaultTransferSyntax | ( |  | ) | const
| protected

## ◆ GetPresentationContexts()

PresentationContextArrayType const & gdcm::PresentationContextGenerator::GetPresentationContexts | ( |  | ) |
| inline

Examples
  CStoreQtProgress.cxx.

## ◆ SetDefaultTransferSyntax()

void gdcm::PresentationContextGenerator::SetDefaultTransferSyntax | ( | const TransferSyntax & | ts | ) |

Not implemented for now. GDCM internally uses Implicit Little Endian.

## ◆ SetMergeModeToAbstractSyntax()

void gdcm::PresentationContextGenerator::SetMergeModeToAbstractSyntax | ( |  | ) |

## ◆ SetMergeModeToTransferSyntax()

void gdcm::PresentationContextGenerator::SetMergeModeToTransferSyntax | ( |  | ) |

The documentation for this class was generated from the following file:

- gdcmPresentationContextGenerator.h