Orthanc Client
Documentation of the client library of Orthanc
 All Classes Files Functions Enumerations Enumerator Groups
Public Member Functions | List of all members
OrthancClient::Instance Class Reference

Connection to an instance stored in Orthanc. More...

#include <OrthancCppClient.h>

Public Member Functions

 Instance (const Instance &other)
 Construct a new reference to this object. More...
 
 Instance (::OrthancClient::OrthancConnection &connection, const ::std::string &id)
 Create a connection to some image instance. More...
 
 ~Instance ()
 Destructs the object. More...
 
inline::std::string GetId () const
 Get the Orthanc identifier of this identifier. More...
 
void SetImageExtractionMode (::Orthanc::ImageExtractionMode mode)
 Set the extraction mode for the 2D image corresponding to this instance. More...
 
inline::Orthanc::ImageExtractionMode GetImageExtractionMode () const
 Get the extraction mode for the 2D image corresponding to this instance. More...
 
inline::std::string GetTagAsString (const ::std::string &tag) const
 Get the string value of some DICOM tag of this instance. More...
 
float GetTagAsFloat (const ::std::string &tag) const
 Get the floating point value that is stored in some DICOM tag of this instance. More...
 
LAAW_INT32 GetTagAsInt (const ::std::string &tag) const
 Get the integer value that is stored in some DICOM tag of this instance. More...
 
LAAW_UINT32 GetWidth ()
 Get the width of the 2D image. More...
 
LAAW_UINT32 GetHeight ()
 Get the height of the 2D image. More...
 
LAAW_UINT32 GetPitch ()
 Get the number of bytes between two lines of the image (pitch). More...
 
inline::Orthanc::PixelFormat GetPixelFormat ()
 Get the format of the pixels of the 2D image. More...
 
const void * GetBuffer ()
 Access the memory buffer in which the raw pixels of the 2D image are stored. More...
 
const void * GetBuffer (LAAW_UINT32 y)
 Access the memory buffer in which the raw pixels of some line of the 2D image are stored. More...
 
LAAW_UINT64 GetDicomSize ()
 Get the size of the DICOM file corresponding to this instance. More...
 
const void * GetDicom ()
 Get a pointer to the content of the DICOM file corresponding to this instance. More...
 
void DiscardImage ()
 Discard the downloaded 2D image, so as to make room in memory. More...
 
void DiscardDicom ()
 Discard the downloaded DICOM file, so as to make room in memory. More...
 

Detailed Description

This class encapsulates a connection to an image instance from a remote instance of Orthanc.

Constructor & Destructor Documentation

OrthancClient::Instance::Instance ( const Instance other)
inline

Construct a new reference to this object. Pay attention to the fact that when the referenced object is deleted, the content of this object will be invalid.

Parameters
otherThe original object.
OrthancClient::Instance::Instance ( ::OrthancClient::OrthancConnection connection,
const ::std::string &  id 
)
inline

Create a connection to some image instance.

Parameters
connectionThe remote instance of Orthanc.
idThe Orthanc identifier of the image instance.
OrthancClient::Instance::~Instance ( )
inline

Destructs the object.

Member Function Documentation

void OrthancClient::Instance::DiscardDicom ( )
inline

Discard the downloaded DICOM file, so as to make room in memory.

void OrthancClient::Instance::DiscardImage ( )
inline

Discard the downloaded 2D image, so as to make room in memory.

const void * OrthancClient::Instance::GetBuffer ( )
inline

Access the memory buffer in which the raw pixels of the 2D image are stored.

Returns
A pointer to the memory buffer.
const void * OrthancClient::Instance::GetBuffer ( LAAW_UINT32  y)
inline

Access the memory buffer in which the raw pixels of some line of the 2D image are stored.

Parameters
yThe line of interest.
Returns
A pointer to the memory buffer.
const void * OrthancClient::Instance::GetDicom ( )
inline

Get a pointer to the content of the DICOM file corresponding to this instance.

Returns
The DICOM file.
LAAW_UINT64 OrthancClient::Instance::GetDicomSize ( )
inline

Get the size of the DICOM file corresponding to this instance.

Returns
The file size.
LAAW_UINT32 OrthancClient::Instance::GetHeight ( )
inline

Get the height of the 2D image that is encoded by this DICOM instance.

Returns
The height.
std::string OrthancClient::Instance::GetId ( ) const
inline

Get the Orthanc identifier of this identifier.

Returns
The identifier.
Orthanc::ImageExtractionMode OrthancClient::Instance::GetImageExtractionMode ( ) const
inline

Get the extraction mode for the 2D image corresponding to this instance.

Returns
The extraction mode.
LAAW_UINT32 OrthancClient::Instance::GetPitch ( )
inline

Get the number of bytes between two lines of the image in the memory buffer returned by GetBuffer(). This value depends on the extraction mode for the image.

Returns
The pitch.
Orthanc::PixelFormat OrthancClient::Instance::GetPixelFormat ( )
inline

Return the memory layout that is used for the 2D image that is encoded by this DICOM instance. This value depends on the extraction mode for the image.

Returns
The pixel format.
float OrthancClient::Instance::GetTagAsFloat ( const ::std::string &  tag) const
inline

Get the floating point value that is stored in some DICOM tag of this instance.

Parameters
tagThe name of the tag of interest.
Returns
The value of the tag.
LAAW_INT32 OrthancClient::Instance::GetTagAsInt ( const ::std::string &  tag) const
inline

Get the integer value that is stored in some DICOM tag of this instance.

Parameters
tagThe name of the tag of interest.
Returns
The value of the tag.
std::string OrthancClient::Instance::GetTagAsString ( const ::std::string &  tag) const
inline

Get the string value of some DICOM tag of this instance.

Parameters
tagThe name of the tag of interest.
Returns
The value of the tag.
LAAW_UINT32 OrthancClient::Instance::GetWidth ( )
inline

Get the width of the 2D image that is encoded by this DICOM instance.

Returns
The width.
void OrthancClient::Instance::SetImageExtractionMode ( ::Orthanc::ImageExtractionMode  mode)
inline

Set the extraction mode for the 2D image corresponding to this instance.

Parameters
modeThe extraction mode.

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