Exceptions

Introduction

This chapter describes the exception classes thrown by Imebra.

The following classes are described in this chapter:

C++ class

Objective-C/Swift class

Description

imebra::ExceptionsManager

N/A

Keeps track of the methods travelled by the exception

imebra::MissingDataElementError

ImebraMissingDataElementError

Base class for the “missing data” exceptions

imebra::MissingGroupError

ImebraMissingGroupError

Thrown when a tag group is missing

imebra::MissingTagError

ImebraMissingTagError

Thrown when a tag is missing

imebra::MissingBufferError

ImebraMissingBufferError

Thrown when a tag’s buffer is missing

imebra::MissingItemError

ImebraMissingItemError

Thrown when a sequence item is missing

imebra::StreamError

ImebraStreamError

Base class for stream related exceptions

imebra::StreamOpenError

ImebraStreamOpenError

Thrown when the stream cannot be open

imebra::StreamReadError

ImebraStreamReadError

Thrown when the stream cannot be read

imebra::StreamWriteError

ImebraStreamWriteError

Thrown when the stream cannot be written

imebra::StreamClosedError

ImebraStreamClosedError

Thrown when accessing a closed stream

imebra::StreamEOFError

ImebraStreamEOFError

Thrown when the end of the stream has been reached

imebra::TCPConnectionRefused

ImebraTCPConnectionRefused

Thrown when a TCP connection is refused

imebra::TCPAddressAlreadyInUse

ImebraTCPAddressAlreadyInUse

Thrown when using an already used address

imebra::PermissionDeniedError

ImebraPermissionDeniedError

Thrown when using a privileged TCP port

imebra::AddressError

ImebraAddressError

Base class for TCP address related exceptions

imebra::AddressTryAgainError

ImebraAddressTryAgainError

Thrown when the address cannot momentarily be resolved

imebra::AddressNoNameError

ImebraAddressNoNameError

Thrown when the name cannot be resolved

imebra::AddressServiceNotSupportedError

ImebraAddressServiceNotSupportedError

Thrown when the requested service is unknown

imebra::DictionaryError

ImebraDictionaryError

Base class for Dictionary related exceptions

imebra::DictionaryUnknownTagError

ImebraDictionaryUnknownTagError

Thrown when the tag is unknown

imebra::DictionaryUnknownDataTypeError

ImebraDictionaryUnknownDataTypeError

Thrown when a data type is unknown

imebra::CharsetConversionError

ImebraCharsetConversionError

Base class for charset conversion related exceptions

imebra::CharsetConversionNoTableError

ImebraCharsetConversionNoTableError

The charset table is unknown

imebra::CharsetConversionNoSupportedTableError

ImebraCharsetConversionNoSupportedTableError

The charset table is not installed on the system

imebra::CharsetConversionCannotConvert

CharsetConversionCannotConvert

Thrown when a string cannot be converted using the charsets declared in the dataset

imebra::CodecError

ImebraCodecError

Base class for codec related exceptions

imebra::CodecWrongFormatError

ImebraCodecWrongFormatError

Thrown when a codec cannot parse the byte stream

imebra::CodecCorruptedFileError

ImebraCodecCorruptedFileError

Thrown when the byte stream is corrupted

imebra::CodecWrongTransferSyntaxError

ImebraCodecWrongTransferSyntaxError

Thrown when the transfer syntax is unknown

imebra::CodecImageTooBigError

ImebraCodecImageTooBigError

Thrown when the image size is too big

imebra::InvalidSequenceItemError

ImebraInvalidSequenceItemError

Thrown when a sequence has a wrong VR

imebra::StreamJpegTagInStreamError

ImebraStreamJpegTagInStreamError

Thrown when a jpeg tag is in the wrong position

imebra::DicomCodecError

ImebraDicomCodecError

Base class for DICOM codec exceptions

imebra::DicomCodecDepthLimitReachedError

ImebraDicomCodecDepthLimitReachedError

Thrown when too many sequences are embedded into each other

imebra::JpegCodecError

ImebraJpegCodecError

Base class for jpeg related exceptions

imebra::JpegCodecCannotHandleSyntaxError

ImebraJpegCodecCannotHandleSyntaxError

Thrown when the JPEG SOF ID cannot be processed

imebra::DataHandlerError

ImebraDataHandlerError

Base class for data handler related exceptions

imebra::DataHandlerConversionError

ImebraDataHandlerConversionError

Thrown when the data cannot be converted

imebra::DataHandlerCorruptedBufferError

ImebraDataHandlerCorruptedBufferError

Thrown when a data buffer is corrupted

imebra::DataHandlerInvalidDataError

ImebraDataHandlerInvalidDataError

Thrown when trying to store invalid data

imebra::DataSetError

ImebraDataSetError

Base class for DataSet related exceptions

imebra::DataSetDifferentFormatError

ImebraDataSetDifferentFormatError

Thrown when the operation requires a change of transfer syntax

imebra::DataSetUnknownTransferSyntaxError

ImebraDataSetUnknownTransferSyntaxError

Thrown when none of the code support the transfer syntax

imebra::DataSetWrongFrameError

ImebraDataSetWrongFrameError

Thrown when storing the wrong frame

imebra::DataSetImageDoesntExistError

ImebraDataSetImageDoesntExistError

Thrown when attempting to retrieve a frame that does not exist

imebra::DataSetImagePaletteColorIsReadOnly

ImebraDataSetImagePaletteColorIsReadOnly

Thrown when trying to write a Palette image

imebra::DataSetCorruptedOffsetTableError

ImebraDataSetCorruptedOffsetTableError

Thrown when the table offset for the images is corrupted

imebra::DicomDirError

ImebraDicomDirError

Base class for DICOMDIR related exceptions

imebra::DicomDirCircularReferenceError

ImebraDicomDirCircularReferenceError

Thrown when a dicomentry references a parent entry as a child

imebra::HuffmanError

ImebraHuffmanError

Base class for huffman related exceptions

imebra::HuffmanCreateTableError

ImebraHuffmanCreateTableError

Thrown when the Huffman table cannot be created

imebra::HuffmanReadError

ImebraHuffmanReadError

Thrown when an invalid Huffman code is read

imebra::HuffmanWriteError

ImebraHuffmanWriteError

Thrown when writing a value that is not in the Huffman table

imebra::ImageError

ImebraImageError

Base class for Image related exceptions

imebra::ImageUnknownDepthError

ImebraImageUnknownDepthError

Thrown when the bit depth parameter is wrong

imebra::ImageUnknownColorSpaceError

ImebraImageUnknownColorSpaceError

Thrown when the color space is not recognized

imebra::ImageInvalidSizeError

ImebraImageInvalidSizeError

Thrown when the image size is invalid

imebra::TransformError

ImebraTransformError

Base class for Transform related exceptions

imebra::TransformInvalidAreaError

ImebraTransformInvalidAreaError

Thrown when the transform area is invalid

imebra::TransformDifferentHighBitError

ImebraTransformDifferentHighBitError

Thrown when the high bit of the input image is different from the high bit of the output image

imebra::ColorTransformError

ImebraColorTransformError

Base class for Color Transform related exceptions

imebra::ColorTransformWrongColorSpaceError

ImebraColorTransformWrongColorSpaceError

Thrown when the input or output images of a color transform have the wrong color space

imebra::ColorTransformsFactoryError

ImebraColorTransformsFactoryError

Base class for Color Transform Factory related exceptions

imebra::ColorTransformsFactoryNoTransformError

ImebraColorTransformsFactoryNoTransformError

Thrown when a conversion between the specified color spaces does not exist

imebra::TransformDifferentColorSpacesError

ImebraTransformDifferentColorSpacesError

Thrown when the input and output images of a High Bit Transform have different color spaces

imebra::ModalityVOILUTError

ImebraModalityVOILUTError

Thrown when the input or output images of a VOILUT transform are not monochromatic

imebra::ImebraBadAlloc

ImebraBadAlloc

Thrown when Imebra cannot allocate memory

imebra::MemoryError

ImebraMemoryError

Base class for ReadMemory and ReadWriteMemory related exceptions

imebra::MemorySizeError

ImebraMemorySizeError

Thrown when the allocated memory is too small

imebra::LutError

ImebraLutError

Base class for LUT related exceptions

imebra::LutCorruptedError

ImebraLutCorruptedError

Thrown when the LUT content is corrupted

imebra::AcseError

ImebraAcseError

Base class for ACSE related exceptions

imebra::AcseCorruptedMessageError

ImebraAcseCorruptedMessageError

Thrown when an ACSE message is corrupted

imebra::AcseNoTransferSyntaxError

ImebraAcseNoTransferSyntaxError

Thrown when a transfer syntax is not available for the abstract syntax

imebra::AcsePresentationContextNotRequestedError

ImebraAcsePresentationContextNotRequestedError

Thrown when the presentation context wasn’t requested during the association negotiation

imebra::AcseWrongRoleError

ImebraAcseWrongRoleError

Thrown if the service is using the wrong role for the presentation context

imebra::AcseWrongIdError

ImebraAcseWrongIdError

Base class for wrong message ID exceptions

imebra::AcseWrongResponseIdError

ImebraAcseWrongResponseIdError

Thrown when a response has the wrong ID

imebra::AcseWrongCommandIdError

ImebraAcseWrongCommandIdError

Thrown when a command has the wrong ID

imebra::AcseRejectedAssociationError

ImebraAcseRejectedAssociationError

Base class for association negotiation related exceptions

imebra::AcseSCUNoReasonGivenError

ImebraAcseSCUNoReasonGivenError

Association rejected by SCU with no given reasons

imebra::AcseSCUApplicationContextNameNotSupportedError

ImebraAcseSCUApplicationContextNameNotSupportedError

Association rejected by SCU because of wrong application context name

imebra::AcseSCUCallingAETNotRecognizedError

ImebraAcseSCUCallingAETNotRecognizedError

Association rejected by SCU because the calling AET was not recognized

imebra::AcseSCUCalledAETNotRecognizedError

ImebraAcseSCUCalledAETNotRecognizedError

Association rejected by SCU because the called AET was not recognized

imebra::AcseSCPNoReasonGivenError

ImebraAcseSCPNoReasonGivenError

Association rejected by SCP with no given reasons

imebra::AcseSCPAcseProtocolVersionNotSupportedError

ImebraAcseSCPAcseProtocolVersionNotSupportedError

Association rejected by SCP because the protocol version was not supported

imebra::AcseSCPPresentationReservedError

ImebraAcseSCPPresentationReservedError

Association rejected by SCP because of the usage of a reserved presentation context ID

imebra::AcseSCPPresentationTemporaryCongestionError

ImebraAcseSCPPresentationTemporaryCongestionError

Association rejected by SCP because of a temporary congestion

imebra::AcseSCPPresentationLocalLimitExcededError

ImebraAcseSCPPresentationLocalLimitExcededError

Association rejected by SCP because of a exustion of simultaneous connections

imebra::AcseTooManyOperationsPerformedError

ImebraAcseTooManyOperationsPerformedError

Thrown when too many operations are being performed

imebra::AcseTooManyOperationsInvokedError

ImebraAcseTooManyOperationsInvokedError

Thrown when too many operations are being invoked

imebra::AcseNoPayloadError

ImebraAcseNoPayloadError

Thrown when a payload was expected but is missing

imebra::DimseError

ImebraDimseError

Base class for DIMSE related exceptions

imebra::DimseInvalidCommand

ImebraDimseInvalidCommand

Thrown when an invalid command is received

Exceptions manager

ExceptionsManager

C++

class ExceptionsManager

Return the stack trace for the last exception thrown in the current thread.

Public Static Functions

static std::string getExceptionTrace()

Return a message containing the stack trace for the last exception thrown in the current thread.

Return

a message containing the stack trace

Missing data exceptions

MissingDataElementError

C++

class MissingDataElementError : public std::runtime_error

Base class for the exceptions that report a missing element (Image, Tag, group, etc).

Subclassed by imebra::MissingBufferError, imebra::MissingGroupError, imebra::MissingItemError, imebra::MissingTagError

Public Functions

MissingDataElementError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraMissingDataElementError : public NSError

Subclassed by ImebraMissingBufferError, ImebraMissingGroupError, ImebraMissingItemError, ImebraMissingTagError

MissingGroupError

C++

class MissingGroupError : public imebra::MissingDataElementError

This exception is thrown when the client tries to read a tag from a group that does not exist.

Public Functions

MissingGroupError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraMissingGroupError : public ImebraMissingDataElementError

MissingTagError

C++

class MissingTagError : public imebra::MissingDataElementError

This exception is thrown when the client tries to read a value from a tag that does not exist (inside an existing group).

Public Functions

MissingTagError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraMissingTagError : public ImebraMissingDataElementError

MissingBufferError

C++

class MissingBufferError : public imebra::MissingDataElementError

This exception is thrown when the client tries to read a value from a buffer that does not exist (inside an existing tag).

Public Functions

MissingBufferError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraMissingBufferError : public ImebraMissingDataElementError

MissingItemError

C++

class MissingItemError : public imebra::MissingDataElementError

This exception is thrown when the client tries to read a value from an element that does not exist (inside an existing buffer).

Public Functions

MissingItemError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraMissingItemError : public ImebraMissingDataElementError

Stream error exceptions

StreamError

C++

class StreamError : public std::runtime_error

The base exception for all the exceptions thrown by the function in baseStream.

Subclassed by imebra::StreamEOFError, imebra::StreamOpenError, imebra::StreamReadError, imebra::StreamWriteError

Public Functions

StreamError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraStreamError : public NSError

Subclassed by ImebraStreamEOFError, ImebraStreamOpenError, ImebraStreamReadError, ImebraStreamWriteError

StreamOpenError

C++

class StreamOpenError : public imebra::StreamError

Exception thrown when the stream cannot be open.

Subclassed by imebra::TCPAddressAlreadyInUse, imebra::TCPConnectionRefused

Public Functions

StreamOpenError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraStreamOpenError : public ImebraStreamError

Subclassed by ImebraTCPAddressAlreadyInUse, ImebraTCPConnectionRefused

StreamReadError

C++

class StreamReadError : public imebra::StreamError

Exception thrown when there is an error during the read phase.

Public Functions

StreamReadError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraStreamReadError : public ImebraStreamError

StreamWriteError

C++

class StreamWriteError : public imebra::StreamError

Exception thrown when there is an error during the write phase.

Public Functions

StreamWriteError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraStreamWriteError : public ImebraStreamError

StreamClosedError

C++

class StreamClosedError : public imebra::StreamEOFError

Exception thrown when a stream has been closed.

Public Functions

StreamClosedError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraStreamClosedError : public ImebraStreamEOFError

StreamEOFError

C++

class StreamEOFError : public imebra::StreamError

Exception thrown when an attempt to read past the end of the file is made.

Subclassed by imebra::StreamClosedError

Public Functions

StreamEOFError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraStreamEOFError : public ImebraStreamError

Subclassed by ImebraStreamClosedError

TCP exceptions

TCPConnectionRefused

C++

class TCPConnectionRefused : public imebra::StreamOpenError

The peer refused the attempted connection.

Objective-C/Swift

class ImebraTCPConnectionRefused : public ImebraStreamOpenError

TCPAddressAlreadyInUse

C++

class TCPAddressAlreadyInUse : public imebra::StreamOpenError

The specified address is already in use by another socket.

Objective-C/Swift

class ImebraTCPAddressAlreadyInUse : public ImebraStreamOpenError

PermissionDeniedError

C++

class PermissionDeniedError : public std::runtime_error

The application does not have the permissions to carry out the operation.

Objective-C/Swift

class ImebraPermissionDeniedError : public NSError

AddressError

C++

class AddressError : public std::runtime_error

Base class for the exceptions thrown by TCPAddress.

Subclassed by imebra::AddressNoNameError, imebra::AddressServiceNotSupportedError, imebra::AddressTryAgainError

Public Functions

AddressError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraAddressError : public NSError

Subclassed by ImebraAddressNoNameError, ImebraAddressServiceNotSupportedError, ImebraAddressTryAgainError

AddressTryAgainError

C++

class AddressTryAgainError : public imebra::AddressError

Exception thrown by TCPAddress when a temporary malfunction prevented the address resolution. Trying again may cancel the error condition.

Public Functions

AddressTryAgainError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraAddressTryAgainError : public ImebraAddressError

AddressNoNameError

C++

class AddressNoNameError : public imebra::AddressError

Exception thrown by TCPAddress when the name cannot be resolved.

Public Functions

AddressNoNameError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraAddressNoNameError : public ImebraAddressError

AddressServiceNotSupportedError

C++

class AddressServiceNotSupportedError : public imebra::AddressError

Exception thrown by TCPAddress when the specified service is not supported.

Public Functions

AddressServiceNotSupportedError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraAddressServiceNotSupportedError : public ImebraAddressError

Dictionary exceptions

DictionaryError

C++

class DictionaryError : public std::runtime_error

Base class for the exceptions thrown by the DicomDictionary.

Subclassed by imebra::DictionaryUnknownDataTypeError, imebra::DictionaryUnknownTagError

Public Functions

DictionaryError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDictionaryError : public NSError

Subclassed by ImebraDictionaryUnknownDataTypeError, ImebraDictionaryUnknownTagError

DictionaryUnknownTagError

C++

class DictionaryUnknownTagError : public imebra::DictionaryError

This exception is thrown by the DicomDictionary when it must return information for a tag that the DICOM standard does not define.

Public Functions

DictionaryUnknownTagError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDictionaryUnknownTagError : public ImebraDictionaryError

DictionaryUnknownDataTypeError

C++

class DictionaryUnknownDataTypeError : public imebra::DictionaryError

This exception is thrown by the DicomDictionary when it must return information for a VR (data type) that the DICOM standard does not define.

Public Functions

DictionaryUnknownDataTypeError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDictionaryUnknownDataTypeError : public ImebraDictionaryError

Charset conversion exceptions

CharsetConversionError

C++

class CharsetConversionError : public std::runtime_error

Base class for the exceptions thrown by charsetConversion.

Subclassed by imebra::CharsetConversionCannotConvert, imebra::CharsetConversionNoSupportedTableError, imebra::CharsetConversionNoTableError

Public Functions

CharsetConversionError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraCharsetConversionError : public NSError

Subclassed by ImebraCharsetConversionCannotConvert, ImebraCharsetConversionNoSupportedTableError, ImebraCharsetConversionNoTableError

CharsetConversionNoTableError

C++

class CharsetConversionNoTableError : public imebra::CharsetConversionError

Exception thrown when the requested charset is not supported by the DICOM standard.

Public Functions

CharsetConversionNoTableError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraCharsetConversionNoTableError : public ImebraCharsetConversionError

CharsetConversionNoSupportedTableError

C++

class CharsetConversionNoSupportedTableError : public imebra::CharsetConversionError

Exception thrown when the requested charset is not supported by the system.

Public Functions

CharsetConversionNoSupportedTableError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraCharsetConversionNoSupportedTableError : public ImebraCharsetConversionError

CharsetConversionCannotConvert

C++

class CharsetConversionCannotConvert : public imebra::CharsetConversionError

Exception thrown when none of the charsets declared in the DataSet are able to convert a string to/from unicode.

Public Functions

CharsetConversionCannotConvert(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

Warning

doxygenclass: Cannot find class “CharsetConversionCannotConvert” in doxygen xml output for project “imebra” from directory: ./doxygen_xml/

Codec exceptions

CodecError

C++

class CodecError : public std::runtime_error

This is the base class for the exceptions thrown by the codec derived classes.

Subclassed by imebra::CodecCorruptedFileError, imebra::CodecImageTooBigError, imebra::CodecWrongFormatError, imebra::CodecWrongTransferSyntaxError, imebra::DicomCodecError, imebra::InvalidSequenceItemError, imebra::JpegCodecError

Public Functions

CodecError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

CodecWrongFormatError

C++

class CodecWrongFormatError : public imebra::CodecError

This exception is thrown when the file being parsed is not valid for the codec.

Public Functions

CodecWrongFormatError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraCodecWrongFormatError : public ImebraCodecError

CodecCorruptedFileError

C++

class CodecCorruptedFileError : public imebra::CodecError

This exception is thrown when the file being parsed is corrupted.

Public Functions

CodecCorruptedFileError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraCodecCorruptedFileError : public ImebraCodecError

CodecWrongTransferSyntaxError

C++

class CodecWrongTransferSyntaxError : public imebra::CodecError

This exception is thrown when the transfer syntax is not recognized by the codec.

Public Functions

CodecWrongTransferSyntaxError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraCodecWrongTransferSyntaxError : public ImebraCodecError

CodecImageTooBigError

C++

class CodecImageTooBigError : public imebra::CodecError

This exception is thrown when the codec reads a file that contains an image that is too big according to the codecFactory settings.

Consider using CodecFactory::setMaximumImageSize() to change the allowed maximum image size.

Public Functions

CodecImageTooBigError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraCodecImageTooBigError : public ImebraCodecError

InvalidSequenceItemError

C++

class InvalidSequenceItemError : public imebra::CodecError

This exception is thrown when the codec is attempting to create a sequence with an incompatible data type.

Public Functions

InvalidSequenceItemError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraInvalidSequenceItemError : public ImebraCodecError

DicomCodecError

C++

class DicomCodecError : public imebra::CodecError

This is the base class for the exceptions thrown by the dicom codec (dicomCodec).

Subclassed by imebra::DicomCodecDepthLimitReachedError

Public Functions

DicomCodecError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDicomCodecError : public ImebraCodecError

Subclassed by ImebraDicomCodecDepthLimitReachedError

DicomCodecDepthLimitReachedError

C++

class DicomCodecDepthLimitReachedError : public imebra::DicomCodecError

This exception is thrown when dicomCodec::parseStream reaches the maximum depth for embedded datasets.

Public Functions

DicomCodecDepthLimitReachedError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDicomCodecDepthLimitReachedError : public ImebraDicomCodecError

JpegCodecError

C++

class JpegCodecError : public imebra::CodecError

Base class for the exceptions thrown by the jpeg codec.

Subclassed by imebra::JpegCodecCannotHandleSyntaxError

Public Functions

JpegCodecError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraJpegCodecError : public ImebraCodecError

Subclassed by ImebraJpegCodecCannotHandleSyntaxError

JpegCodecCannotHandleSyntaxError

C++

class JpegCodecCannotHandleSyntaxError : public imebra::JpegCodecError

Exception thrown when the jpeg variant cannot be handled.

Public Functions

JpegCodecCannotHandleSyntaxError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraJpegCodecCannotHandleSyntaxError : public ImebraJpegCodecError

Data handler exceptions

DataHandlerError

C++

class DataHandlerError : public std::runtime_error

Base class for the exceptions thrown by the data handlers.

Subclassed by imebra::DataHandlerConversionError, imebra::DataHandlerCorruptedBufferError, imebra::DataHandlerInvalidDataError

Public Functions

DataHandlerError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDataHandlerError : public NSError

Subclassed by ImebraDataHandlerConversionError, ImebraDataHandlerCorruptedBufferError, ImebraDataHandlerInvalidDataError

DataHandlerConversionError

C++

class DataHandlerConversionError : public imebra::DataHandlerError

This exception is thrown when a data handler cannot convert a value from one data type to a different data type.

Public Functions

DataHandlerConversionError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDataHandlerConversionError : public ImebraDataHandlerError

DataHandlerCorruptedBufferError

C++

class DataHandlerCorruptedBufferError : public imebra::DataHandlerError

This exception is thrown when the data handler’s content is corrupted.

Public Functions

DataHandlerCorruptedBufferError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDataHandlerCorruptedBufferError : public ImebraDataHandlerError

DataHandlerInvalidDataError

C++

class DataHandlerInvalidDataError : public imebra::DataHandlerError

This exception is thrown when the client tries to write invalid data into a data handler.

Public Functions

DataHandlerInvalidDataError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDataHandlerInvalidDataError : public ImebraDataHandlerError

DataSet exceptions

DataSetError

C++

class DataSetError : public std::runtime_error

This is the base class for the exceptions thrown by the dataSet.

Subclassed by imebra::DataSetCorruptedOffsetTableError, imebra::DataSetDifferentFormatError, imebra::DataSetImageDoesntExistError, imebra::DataSetImagePaletteColorIsReadOnly, imebra::DataSetUnknownTransferSyntaxError, imebra::DataSetWrongFrameError

Public Functions

DataSetError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

DataSetDifferentFormatError

C++

class DataSetDifferentFormatError : public imebra::DataSetError

This exception is thrown when the application is trying to store an image in the dataSet but the dataSet already stores other images that have different attributes.

Public Functions

DataSetDifferentFormatError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDataSetDifferentFormatError : public ImebraDataSetError

DataSetUnknownTransferSyntaxError

C++

class DataSetUnknownTransferSyntaxError : public imebra::DataSetError

This exception is thrown when an unknown transfer syntax is being used while reading or writing a stream.

Public Functions

DataSetUnknownTransferSyntaxError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDataSetUnknownTransferSyntaxError : public ImebraDataSetError

DataSetWrongFrameError

C++

class DataSetWrongFrameError : public imebra::DataSetError

This exception is thrown when the application is storing several images in the dataSet but doesn’t store them in the right order.

The application must store the images following the frame order, without skipping frames.

Public Functions

DataSetWrongFrameError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDataSetWrongFrameError : public ImebraDataSetError

DataSetImageDoesntExistError

C++

class DataSetImageDoesntExistError : public imebra::DataSetError

This exception is thrown when the an image that doesn’t exist is requested.

Public Functions

DataSetImageDoesntExistError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDataSetImageDoesntExistError : public ImebraDataSetError

DataSetImagePaletteColorIsReadOnly

C++

class DataSetImagePaletteColorIsReadOnly : public imebra::DataSetError

This exception is thrown when the the client tries to store a palette color image into the dataset.

Public Functions

DataSetImagePaletteColorIsReadOnly(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDataSetImagePaletteColorIsReadOnly : public ImebraDataSetError

DataSetCorruptedOffsetTableError

C++

class DataSetCorruptedOffsetTableError : public imebra::DataSetError

This exception is thrown when the basic offset table is corrupted.

Public Functions

DataSetCorruptedOffsetTableError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDataSetCorruptedOffsetTableError : public ImebraDataSetError

DICOMDIR exceptions

DicomDirError

C++

class DicomDirError : public std::runtime_error

Base class from which the exceptions thrown by DicomDirEntry and DicomDir classes.

Subclassed by imebra::DicomDirCircularReferenceError, imebra::DicomDirNoEntryError

Public Functions

DicomDirError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDicomDirError : public NSError

Subclassed by ImebraDicomDirCircularReferenceError

DicomDirCircularReferenceError

C++

class DicomDirCircularReferenceError : public imebra::DicomDirError

This exception is thrown when a call to DicomDir::setFirstRootRecord() or DicomDirEntry::setNextRecord() or DicomDirEntry::setFirstChildRecord() causes a circular reference between DicomDirEntry objects.

Public Functions

DicomDirCircularReferenceError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraDicomDirCircularReferenceError : public ImebraDicomDirError

Image exceptions

ImageError

class ImageError : public std::runtime_error

This is the base class for the exceptions thrown by the Image class.

Subclassed by imebra::ImageInvalidSizeError, imebra::ImageUnknownColorSpaceError, imebra::ImageUnknownDepthError

Public Functions

ImageError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraImageError : public NSError

Subclassed by ImebraImageInvalidSizeError, ImebraImageUnknownColorSpaceError, ImebraImageUnknownDepthError

ImageUnknownDepthError

C++

class ImageUnknownDepthError : public imebra::ImageError

This exception is thrown when an unknown depth is specified as a parameter.

Public Functions

ImageUnknownDepthError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraImageUnknownDepthError : public ImebraImageError

ImageUnknownColorSpaceError

C++

class ImageUnknownColorSpaceError : public imebra::ImageError

This exception is thrown when an unknown color space is specified in the function create().

Public Functions

ImageUnknownColorSpaceError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraImageUnknownColorSpaceError : public ImebraImageError

ImageInvalidSizeError

C++

class ImageInvalidSizeError : public imebra::ImageError

This exception is thrown when an invalid size in pixels is specified in the Image constructor.

Public Functions

ImageInvalidSizeError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraImageInvalidSizeError : public ImebraImageError

Transform exceptions

TransformError

C++

class TransformError : public std::runtime_error

Base class for the exceptions thrown by the transforms.

Subclassed by imebra::ColorTransformError, imebra::ColorTransformsFactoryError, imebra::ModalityVOILUTError, imebra::TransformDifferentColorSpacesError, imebra::TransformDifferentHighBitError, imebra::TransformInvalidAreaError

Public Functions

TransformError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

TransformInvalidAreaError

C++

class TransformInvalidAreaError : public imebra::TransformError

Exception thrown when the image areas to be processed are out of bounds.

Public Functions

TransformInvalidAreaError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraTransformInvalidAreaError : public ImebraTransformError

TransformDifferentHighBitError

C++

class TransformDifferentHighBitError : public imebra::TransformError

Exception thrown when a Transform cannot process images with different high bit.

Public Functions

TransformDifferentHighBitError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraTransformDifferentHighBitError : public ImebraTransformError

ColorTransformError

C++

class ColorTransformError : public imebra::TransformError

This is the base class for the exceptions thrown by the color transform classes.

Subclassed by imebra::ColorTransformWrongColorSpaceError

Public Functions

ColorTransformError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraColorTransformError : public ImebraTransformError

Subclassed by ImebraColorTransformWrongColorSpaceError

ColorTransformWrongColorSpaceError

C++

class ColorTransformWrongColorSpaceError : public imebra::ColorTransformError

This exception is thrown when a color transform must convert between two color spaces that it does not support.

Public Functions

ColorTransformWrongColorSpaceError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraColorTransformWrongColorSpaceError : public ImebraColorTransformError

ColorTransformsFactoryError

C++

class ColorTransformsFactoryError : public imebra::TransformError

This is the base class for the exceptions thrown by colorTransformsFactory.

Subclassed by imebra::ColorTransformsFactoryNoTransformError

Public Functions

ColorTransformsFactoryError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraColorTransformsFactoryError : public ImebraTransformError

Subclassed by ImebraColorTransformsFactoryNoTransformError

ColorTransformsFactoryNoTransformError

C++

class ColorTransformsFactoryNoTransformError : public imebra::ColorTransformsFactoryError

This exception is thrown by the function ColorTransformsFactory::getTransform() when it cannot find any transform that can convert the specified color spaces.

Public Functions

ColorTransformsFactoryNoTransformError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraColorTransformsFactoryNoTransformError : public ImebraColorTransformsFactoryError

TransformDifferentColorSpacesError

C++

class TransformDifferentColorSpacesError : public imebra::TransformError

Public Functions

TransformDifferentColorSpacesError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraTransformDifferentColorSpacesError : public ImebraTransformError

ModalityVOILUTError

C++

class ModalityVOILUTError : public imebra::TransformError

This exception is thrown by modalityVOILUT when the images passed to the transform are not monochromatic.

Public Functions

ModalityVOILUTError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraModalityVOILUTError : public ImebraTransformError

Memory exceptions

ImebraBadAlloc

C++

class ImebraBadAlloc : public std::bad_alloc

Objective-C/Swift

class ImebraBadAlloc : public NSError

MemoryError

C++

class MemoryError : public std::runtime_error

Base exception for errors in Memory and MutableMemory.

Subclassed by imebra::MemorySizeError

Public Functions

MemoryError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraMemoryError : public NSError

Subclassed by ImebraMemorySizeError

MemorySizeError

C++

class MemorySizeError : public imebra::MemoryError

Exception throw when the memory size is too small for the requested operation.

Public Functions

MemorySizeError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraMemorySizeError : public ImebraMemoryError

LUT exceptions

LutError

C++

class LutError : public std::runtime_error

This is the base class for the exceptions thrown by the LUT class.

Subclassed by imebra::LutCorruptedError

Public Functions

LutError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraLutError : public NSError

LutCorruptedError

C++

class LutCorruptedError : public imebra::LutError

This exception is thrown by the lut class when the the LUT information is corrupted.

Public Functions

LutCorruptedError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraLutCorruptedError : public NSError

ACSE exceptions

AcseCorruptedMessageError

C++

class AcseCorruptedMessageError : public imebra::AcseError

Exception thrown by the ACSE services when an ACSE message is corrupted.

Public Functions

AcseCorruptedMessageError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraAcseCorruptedMessageError : public ImebraAcseError

AcseNoTransferSyntaxError

C++

class AcseNoTransferSyntaxError : public imebra::AcseError

Exception thrown when no transfer syntax was negotiated for a presentation context.

Objective-C/Swift

class ImebraAcseNoTransferSyntaxError : public ImebraAcseError

AcsePresentationContextNotRequestedError

C++

class AcsePresentationContextNotRequestedError : public imebra::AcseError

Exception thrown by the ACSE services when the message’s presentation context was not requested during the association negotiation.

Public Functions

AcsePresentationContextNotRequestedError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraAcsePresentationContextNotRequestedError : public ImebraAcseError

AcseWrongRoleError

C++

class AcseWrongRoleError : public imebra::AcseError

Exception thrown by the ACSE services when a command is sent to a destination that cannot accept it.

Public Functions

AcseWrongRoleError(const std::string &message)

Constructor.

Parameters
  • message: the message to store into the exception

Objective-C/Swift

class ImebraAcseWrongRoleError : public ImebraAcseError

AcseWrongIdError

C++

class AcseWrongIdError : public imebra::AcseError

Base class for the exception related to a wrong message ID.

Subclassed by imebra::AcseWrongCommandIdError, imebra::AcseWrongResponseIdError

Objective-C/Swift

class ImebraAcseWrongIdError : public ImebraAcseError

Subclassed by ImebraAcseWrongCommandIdError, ImebraAcseWrongResponseIdError

AcseWrongResponseIdError

C++

class AcseWrongResponseIdError : public imebra::AcseWrongIdError

Exception thrown when a response ID is related to a command that has already been responded to or was never sent.

Objective-C/Swift

class ImebraAcseWrongResponseIdError : public ImebraAcseWrongIdError

AcseWrongCommandIdError

C++

class AcseWrongCommandIdError : public imebra::AcseWrongIdError

Exception thrown when a command has a wrong message ID.

Objective-C/Swift

class ImebraAcseWrongCommandIdError : public ImebraAcseWrongIdError

AcseRejectedAssociationError

C++

class AcseRejectedAssociationError : public imebra::AcseError

Base class for the association rejection exceptions.

Subclassed by imebra::AcseSCPAcseProtocolVersionNotSupportedError, imebra::AcseSCPNoReasonGivenError, imebra::AcseSCPPresentationLocalLimitExcededError, imebra::AcseSCPPresentationReservedError, imebra::AcseSCPPresentationTemporaryCongestionError, imebra::AcseSCUApplicationContextNameNotSupportedError, imebra::AcseSCUCalledAETNotRecognizedError, imebra::AcseSCUCallingAETNotRecognizedError, imebra::AcseSCUNoReasonGivenError

Public Functions

bool isPermanent() const

Returns true if the rejection is permanent.

Return

true if the rejection is permanent, false otherwise

bool isTemporary() const

Returns true if the rejection is temporary.

Return

true if the rejection is temporary, false otherwise

AcseSCUNoReasonGivenError

C++

class AcseSCUNoReasonGivenError : public imebra::AcseRejectedAssociationError

Generic exception thrown when the association is rejected.

Objective-C/Swift

class ImebraAcseSCUNoReasonGivenError : public ImebraAcseRejectedAssociationError

AcseSCUApplicationContextNameNotSupportedError

C++

class AcseSCUApplicationContextNameNotSupportedError : public imebra::AcseRejectedAssociationError

Exception thrown when the association is rejected because the application context name is not supported.

Objective-C/Swift

class ImebraAcseSCUApplicationContextNameNotSupportedError : public ImebraAcseRejectedAssociationError

AcseSCUCallingAETNotRecognizedError

C++

class AcseSCUCallingAETNotRecognizedError : public imebra::AcseRejectedAssociationError

Exception thrown when the association is rejected because the calling AE title is not recognized.

Objective-C/Swift

class ImebraAcseSCUCallingAETNotRecognizedError : public ImebraAcseRejectedAssociationError

AcseSCUCalledAETNotRecognizedError

C++

class AcseSCUCalledAETNotRecognizedError : public imebra::AcseRejectedAssociationError

Exception thrown when the association is rejected because the called AE title is not recognized.

Objective-C/Swift

class ImebraAcseSCUCalledAETNotRecognizedError : public ImebraAcseRejectedAssociationError

AcseSCPNoReasonGivenError

C++

class AcseSCPNoReasonGivenError : public imebra::AcseRejectedAssociationError

Exception thrown when the association is rejected by the SCP without any particular reason given.

Objective-C/Swift

class ImebraAcseSCPNoReasonGivenError : public ImebraAcseRejectedAssociationError

AcseSCPAcseProtocolVersionNotSupportedError

C++

class AcseSCPAcseProtocolVersionNotSupportedError : public imebra::AcseRejectedAssociationError

Exception thrown when the association is rejected by the SCP because it does not support the requested protocol version.

Objective-C/Swift

class ImebraAcseSCPAcseProtocolVersionNotSupportedError : public ImebraAcseRejectedAssociationError

AcseSCPPresentationReservedError

C++

class AcseSCPPresentationReservedError : public imebra::AcseRejectedAssociationError

Exception thrown when the association is rejected by the SCP because the selected presentation context is reserved.

Objective-C/Swift

class ImebraAcseSCPPresentationReservedError : public ImebraAcseRejectedAssociationError

AcseSCPPresentationTemporaryCongestionError

C++

class AcseSCPPresentationTemporaryCongestionError : public imebra::AcseRejectedAssociationError

Exception thrown when the association is rejected by the SCP because there is a temporary congestion.

Objective-C/Swift

class ImebraAcseSCPPresentationTemporaryCongestionError : public ImebraAcseRejectedAssociationError

AcseSCPPresentationLocalLimitExcededError

C++

class AcseSCPPresentationLocalLimitExcededError : public imebra::AcseRejectedAssociationError

Exception thrown when the association is rejected by the SCP because is out of resources.

Objective-C/Swift

class ImebraAcseSCPPresentationLocalLimitExcededError : public ImebraAcseRejectedAssociationError

AcseTooManyOperationsPerformedError

C++

class AcseTooManyOperationsPerformedError : public imebra::AcseError

Exception thrown when too many simultaneous operations have been requested.

Objective-C/Swift

class ImebraAcseTooManyOperationsPerformedError : public ImebraAcseError

AcseTooManyOperationsInvokedError

C++

class AcseTooManyOperationsInvokedError : public imebra::AcseError

Exception thrown when too many simultaneous operations have been invoked.

Objective-C/Swift

class ImebraAcseTooManyOperationsInvokedError : public ImebraAcseError

AcseNoPayloadError

C++

class AcseNoPayloadError : public imebra::AcseError

Exception thrown when a command does not have a payload but it should have one.

Objective-C/Swift

class ImebraAcseNoPayloadError : public ImebraAcseError

DIMSE exceptions

DimseError

C++

class DimseError : public std::runtime_error

Base class for the exceptions thrown by the DIMSE services.

Subclassed by imebra::DimseInvalidCommand

Objective-C/Swift

class ImebraDimseError : public NSError

Subclassed by ImebraDimseInvalidCommand

DimseInvalidCommand

C++

class DimseInvalidCommand : public imebra::DimseError

Exception thrown when a DIMSE command cannot be validated.

Objective-C/Swift

class ImebraDimseInvalidCommand : public ImebraDimseError