Odil
A C++11 library for the DICOM standard
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
odil Namespace Reference

Namespaces

 base64
 
 dcmtk
 
 dul
 
 message
 
 pdu
 
 registry
 
 webservices
 

Classes

class  Association
 Association. More...
 
class  AssociationAborted
 Exception reported when receiving a message after the association was aborted. More...
 
class  AssociationParameters
 Encapsulate association parameters. More...
 
struct  AssociationRejected
 Exception reported when an incoming association is rejected. More...
 
class  AssociationReleased
 Exception reported when receiving a message after the association was released. More...
 
class  BasicDirectoryCreator
 Write a Basic Directory (i.e. DICOMDIR) object to the disk. More...
 
class  DataSet
 DICOM Data set. More...
 
class  EchoSCP
 SCP for C-Echo services. More...
 
class  EchoSCU
 SCU for the C-ECHO services. More...
 
class  Element
 Element of a DICOM data set. More...
 
struct  ElementsDictionaryEntry
 Entry in a dictionary of DICOM elements. More...
 
class  ElementsDictionaryKey
 Key of a dictionary of DICOM elements. More...
 
class  ElementTraits
 Traits for generic data access to values of DcmElement. More...
 
class  Exception
 Base class for odil exceptions. More...
 
class  FindSCP
 SCP for C-Find services. More...
 
class  FindSCU
 SCU for C-FIND services. More...
 
class  GetSCP
 SCP for C-Get services. More...
 
class  GetSCU
 SCU for C-GET services. More...
 
class  MoveSCP
 SCP for C-Move services. More...
 
class  MoveSCU
 SCU for C-MOVE services. More...
 
class  NCreateSCP
 SCP for N-Create services. More...
 
class  NSetSCP
 SCP for N-Set services. More...
 
class  NSetSCU
 SCU for C-Store services. More...
 
class  Reader
 Read DICOM objects from a stream. More...
 
class  SCP
 Base class for all Service Class Providers. More...
 
class  SCPDispatcher
 Dispatch an incoming message to one of the registered SCPs. More...
 
class  SCU
 Base class for all Service Class Users. More...
 
class  StoreSCP
 SCP for C-Store services. More...
 
class  StoreSCU
 SCU for C-Store services. More...
 
class  Tag
 A DICOM element tag. More...
 
struct  UIDsDictionaryEntry
 Entry in a dictionary of DICOM UIDs. More...
 
class  Value
 A value held in a DICOM element. More...
 
class  VRFinder
 Find the VR of elements in an implicit VR data set. More...
 
class  VRTraits
 Information related to VR. More...
 
class  Writer
 Write DICOM objects to a stream. More...
 

Typedefs

typedef std::function< AssociationParameters(AssociationParameters const &)> AssociationAcceptor
 Callback to check whether the association request is acceptable. More...
 
typedef std::map< ElementsDictionaryKey, ElementsDictionaryEntryElementsDictionary
 
typedef std::map< std::string, UIDsDictionaryEntryUIDsDictionary
 
typedef std::function< std::pair< std::string, std::string >DataSet const &, Tag const &)> BulkDataCreator
 

Enumerations

enum  ByteOrdering { ByteOrdering::LittleEndian, ByteOrdering::BigEndian }
 
enum  VR {
  VR::UNKNOWN, VR::AE, VR::AS, VR::AT,
  VR::CS, VR::DA, VR::DS, VR::DT,
  VR::FL, VR::FD, VR::IS, VR::LO,
  VR::LT, VR::OB, VR::OD, VR::OF,
  VR::OL, VR::OW, VR::PN, VR::SH,
  VR::SL, VR::SQ, VR::SS, VR::ST,
  VR::TM, VR::UC, VR::UI, VR::UL,
  VR::UN, VR::UR, VR::US, VR::UT,
  VR::INVALID
}
 Value representations of DICOM. More...
 

Functions

AssociationParameters default_association_acceptor (AssociationParameters const &input)
 Default association acceptor. More...
 
template<typename TVisitor >
TVisitor::result_type apply_visitor (TVisitor const &visitor, Element const &element)
 Visitor of elements. More...
 
ElementsDictionary::const_iterator find (ElementsDictionary const &dictionary, Tag const &tag)
 
template<typename T >
host_to_big_endian (T const &value)
 
template<typename T >
host_to_little_endian (T const &value)
 
template<typename T >
big_endian_to_host (T const &value)
 
template<typename T >
little_endian_to_host (T const &value)
 
Json::Value as_json (DataSet const &data_set, odil::Value::Strings const &specific_character_set=odil::Value::Strings())
 Convert a data set to its JSON representation. More...
 
DataSet as_dataset (Json::Value const &json)
 Create a data set from its JSON representation. More...
 
std::ostream & operator<< (std::ostream &stream, Tag const &tag)
 Stream inserter. More...
 
std::string generate_uid ()
 Generate a UID under the UID prefix. More...
 
std::string as_utf8 (std::string const &input, Value::Strings const &specific_character_set, bool is_pn=false)
 Convert a string to its UTF-8 representation. More...
 
std::string as_specific_character_set (std::string const &input, Value::Strings const &specific_character_set, bool is_pn=false)
 Convert an UTF-8 string to a specific representation. More...
 
template<typename TVisitor >
TVisitor::result_type apply_visitor (TVisitor const &visitor, Value const &value)
 Visitor of values. More...
 
template<typename TVisitor >
TVisitor::result_type apply_visitor (TVisitor const &visitor, Value &value)
 Visitor of values. More...
 
std::string as_string (VR vr)
 Convert a VR to its string representation. More...
 
VR as_vr (std::string const &vr)
 Convert a string to its VR. More...
 
VR as_vr (Tag const &tag)
 Guess a VR from a tag. More...
 
bool is_int (VR vr)
 Test whether a VR contains integers. More...
 
bool is_real (VR vr)
 Test whether a VR contains rel numbers. More...
 
bool is_string (VR vr)
 Test whether a VR contains text. More...
 
bool is_binary (VR vr)
 Test whether a VR contains binary data. More...
 
void write_ds (double f, char *buffer, int size=16)
 Write a double as a DS to the buffer. More...
 
boost::property_tree::ptree as_xml (DataSet const &data_set, BulkDataCreator const &bulk_data_creator=BulkDataCreator())
 Convert a data set to its XML representation. More...
 
DataSet as_dataset (boost::property_tree::ptree const &xml)
 Create a data set from its XML representation. More...
 

Variables

std::string const uid_prefix ="1.2.826.0.1.3680043.9.5560"
 UID prefix of Odil. More...
 
std::string implementation_class_uid
 Implementation class UID of Odil. More...
 
std::string implementation_version_name
 Implementation version name of Odil. More...
 

Typedef Documentation

◆ AssociationAcceptor

Callback to check whether the association request is acceptable.

The callback shall return the parameters for the acceptation or throw an AssociationRejected exception if the association is not acceptable.

◆ BulkDataCreator

typedef std::function<std::pair<std::string, std::string>DataSet const &, Tag const &)> odil::BulkDataCreator

◆ ElementsDictionary

◆ UIDsDictionary

typedef std::map<std::string, UIDsDictionaryEntry> odil::UIDsDictionary

Enumeration Type Documentation

◆ ByteOrdering

enum odil::ByteOrdering
strong
Enumerator
LittleEndian 
BigEndian 

◆ VR

enum odil::VR
strong

Value representations of DICOM.

Enumerator
UNKNOWN 
AE 
AS 
AT 
CS 
DA 
DS 
DT 
FL 
FD 
IS 
LO 
LT 
OB 
OD 
OF 
OL 
OW 
PN 
SH 
SL 
SQ 
SS 
ST 
TM 
UC 
UI 
UL 
UN 
UR 
US 
UT 
INVALID 

Function Documentation

◆ apply_visitor() [1/3]

template<typename TVisitor >
TVisitor::result_type odil::apply_visitor ( TVisitor const &  visitor,
Element const &  element 
)

Visitor of elements.

◆ apply_visitor() [2/3]

template<typename TVisitor >
TVisitor::result_type odil::apply_visitor ( TVisitor const &  visitor,
Value const &  value 
)

Visitor of values.

◆ apply_visitor() [3/3]

template<typename TVisitor >
TVisitor::result_type odil::apply_visitor ( TVisitor const &  visitor,
Value value 
)

Visitor of values.

◆ as_dataset() [1/2]

DataSet odil::as_dataset ( Json::Value const &  json)

Create a data set from its JSON representation.

◆ as_dataset() [2/2]

DataSet odil::as_dataset ( boost::property_tree::ptree const &  xml)

Create a data set from its XML representation.

◆ as_json()

Json::Value odil::as_json ( DataSet const &  data_set,
odil::Value::Strings const &  specific_character_set = odil::Value::Strings() 
)

Convert a data set to its JSON representation.

◆ as_specific_character_set()

std::string odil::as_specific_character_set ( std::string const &  input,
Value::Strings const &  specific_character_set,
bool  is_pn = false 
)

Convert an UTF-8 string to a specific representation.

◆ as_string()

std::string odil::as_string ( VR  vr)

Convert a VR to its string representation.

◆ as_utf8()

std::string odil::as_utf8 ( std::string const &  input,
Value::Strings const &  specific_character_set,
bool  is_pn = false 
)

Convert a string to its UTF-8 representation.

◆ as_vr() [1/2]

VR odil::as_vr ( std::string const &  vr)

Convert a string to its VR.

If the string does not represent a VR, a odil::Exception is raised.

◆ as_vr() [2/2]

VR odil::as_vr ( Tag const &  tag)

Guess a VR from a tag.

If the VR cannot be guessed, a odil::Exception is raised.

◆ as_xml()

boost::property_tree::ptree odil::as_xml ( DataSet const &  data_set,
BulkDataCreator const &  bulk_data_creator = BulkDataCreator() 
)

Convert a data set to its XML representation.

◆ big_endian_to_host()

template<typename T >
T odil::big_endian_to_host ( T const &  value)

◆ default_association_acceptor()

AssociationParameters odil::default_association_acceptor ( AssociationParameters const &  input)

Default association acceptor.

Reverse the calling and called AE titles, accept the first transfer syntax and the roles of each presentation context, do not check identity, keep maximum length.

◆ find()

ElementsDictionary::const_iterator odil::find ( ElementsDictionary const &  dictionary,
Tag const &  tag 
)

◆ generate_uid()

std::string odil::generate_uid ( )

Generate a UID under the UID prefix.

◆ host_to_big_endian()

template<typename T >
T odil::host_to_big_endian ( T const &  value)

◆ host_to_little_endian()

template<typename T >
T odil::host_to_little_endian ( T const &  value)

◆ is_binary()

bool odil::is_binary ( VR  vr)

Test whether a VR contains binary data.

◆ is_int()

bool odil::is_int ( VR  vr)

Test whether a VR contains integers.

◆ is_real()

bool odil::is_real ( VR  vr)

Test whether a VR contains rel numbers.

◆ is_string()

bool odil::is_string ( VR  vr)

Test whether a VR contains text.

◆ little_endian_to_host()

template<typename T >
T odil::little_endian_to_host ( T const &  value)

◆ operator<<()

std::ostream& odil::operator<< ( std::ostream &  stream,
Tag const &  tag 
)

Stream inserter.

◆ write_ds()

void odil::write_ds ( double  f,
char *  buffer,
int  size = 16 
)

Write a double as a DS to the buffer.

Variable Documentation

◆ implementation_class_uid

std::string odil::implementation_class_uid

Implementation class UID of Odil.

◆ implementation_version_name

std::string odil::implementation_version_name

Implementation version name of Odil.

◆ uid_prefix

std::string const odil::uid_prefix ="1.2.826.0.1.3680043.9.5560"

UID prefix of Odil.