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

Namespaces

namespace  base64
 
namespace  dcmtk
 
namespace  dul
 
namespace  logging
 
namespace  message
 
namespace  pdu
 
namespace  registry
 
namespace  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  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  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.
 
typedef std::map< ElementsDictionaryKey, ElementsDictionaryEntryElementsDictionary
 
typedef boost::iostreams::stream< boost::iostreams::array_source > IStringStream
 Source stringstream which does not copy its buffer.
 
typedef boost::iostreams::stream< boost::iostreams::back_insert_device< std::string > > OStringStream
 Sink stringstream which does not copy its buffer.
 
typedef std::map< std::string, UIDsDictionaryEntryUIDsDictionary
 
typedef std::function< std::pair< std::string, std::string >(std::shared_ptr< DataSet const >, Tag const &) > BulkDataCreator
 

Enumerations

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

Functions

AssociationParameters default_association_acceptor (AssociationParameters const &input)
 Default association acceptor.
 
template<typename TVisitor >
TVisitor::result_type apply_visitor (TVisitor const &visitor, Element const &element)
 Visitor of elements.
 
ElementsDictionary::const_iterator find (ElementsDictionary const &dictionary, Tag const &tag)
 
ByteOrdering get_endianness ()
 
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 (std::shared_ptr< DataSet const > data_set, Value::Strings const &specific_character_set={})
 Convert a data set to its JSON representation.
 
std::shared_ptr< DataSetas_dataset (Json::Value const &json)
 Create a data set from its JSON representation.
 
template<typename T >
as (std::string const &string)
 
std::ostream & operator<< (std::ostream &stream, Tag const &tag)
 Stream inserter.
 
std::string generate_uid ()
 Generate a UID under the UID prefix.
 
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.
 
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.
 
bool operator== (Value::DataSets const &left, Value::DataSets const &right)
 Equality test.
 
bool operator!= (Value::DataSets const &left, Value::DataSets const &right)
 Difference test.
 
template<typename TVisitor >
TVisitor::result_type apply_visitor (TVisitor const &visitor, Value const &value)
 Visitor of values.
 
template<typename TVisitor >
TVisitor::result_type apply_visitor (TVisitor const &visitor, Value &value)
 Visitor of values.
 
std::string as_string (VR vr)
 Convert a VR to its string representation.
 
VR as_vr (std::string const &vr)
 Convert a string to its VR.
 
VR as_vr (Tag const &tag)
 Guess a VR from a tag.
 
bool is_int (VR vr)
 Test whether a VR contains integers.
 
bool is_real (VR vr)
 Test whether a VR contains rel numbers.
 
bool is_string (VR vr)
 Test whether a VR contains text.
 
bool is_binary (VR vr)
 Test whether a VR contains binary data.
 
void write_ds (double f, char *buffer, int size=16)
 Write a double as a DS to the buffer.
 
boost::property_tree::ptree as_xml (std::shared_ptr< DataSet const > data_set, BulkDataCreator const &bulk_data_creator={})
 Convert a data set to its XML representation.
 
std::shared_ptr< DataSetas_dataset (boost::property_tree::ptree const &xml)
 Create a data set from its XML representation.
 

Variables

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

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>( std::shared_ptr<DataSet const>, Tag const &) > odil::BulkDataCreator

◆ ElementsDictionary

◆ IStringStream

typedef boost::iostreams::stream<boost::iostreams::array_source> odil::IStringStream

Source stringstream which does not copy its buffer.

◆ OStringStream

typedef boost::iostreams::stream< boost::iostreams::back_insert_device<std::string> > odil::OStringStream

Sink stringstream which does not copy its buffer.

◆ UIDsDictionary

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

Enumeration Type Documentation

◆ ByteOrdering

enum class odil::ByteOrdering
strong
Enumerator
LittleEndian 
BigEndian 

◆ VR

enum class 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 
OV 
OW 
PN 
SH 
SL 
SQ 
SS 
ST 
SV 
TM 
UC 
UI 
UL 
UN 
UR 
US 
UT 
UV 
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 value 
)

Visitor of values.

◆ apply_visitor() [3/3]

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

Visitor of values.

◆ as()

template<typename T >
T odil::as ( std::string const &  string)

◆ as_dataset() [1/2]

std::shared_ptr< DataSet > odil::as_dataset ( boost::property_tree::ptree const &  xml)

Create a data set from its XML representation.

◆ as_dataset() [2/2]

std::shared_ptr< DataSet > odil::as_dataset ( Json::Value const &  json)

Create a data set from its JSON representation.

◆ as_json()

Json::Value odil::as_json ( std::shared_ptr< DataSet const >  data_set,
Value::Strings const &  specific_character_set = {} 
)

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 ( std::shared_ptr< DataSet const >  data_set,
BulkDataCreator const &  bulk_data_creator = {} 
)

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.

◆ get_endianness()

ByteOrdering odil::get_endianness ( )

◆ 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!=()

bool odil::operator!= ( Value::DataSets const &  left,
Value::DataSets const &  right 
)

Difference test.

◆ operator<<()

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

Stream inserter.

◆ operator==()

bool odil::operator== ( Value::DataSets const &  left,
Value::DataSets const &  right 
)

Equality test.

This will have priority over the standard operator of std::vector since the latter is templated (cf. 23.3.6.1) and the former is not.

◆ write_ds()

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

Write a double as a DS to the buffer.

Variable Documentation

◆ byte_ordering

ByteOrdering const odil::byte_ordering
extern

◆ implementation_class_uid

std::string odil::implementation_class_uid
extern

Implementation class UID of Odil.

◆ implementation_version_name

std::string odil::implementation_version_name
extern

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.