![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Dicom/DicomError.h>
Structure for storing errors occurring during loading/saving DICOM data. More...
Structure for storing errors occurring during loading/saving DICOM data.
Public Types | |
enum class | Code : int { NoError = 0 , MissingMandatoryElement = 1 , InvalidElementValue = 2 , UnsupportedElementValue = 3 , UnsupportedSOPClass = 4 , UnsupportedPerFrameElement = 5 , FileNotFound = 6 , UnsupportedImageType = 7 , InvalidPath = 8 , InternalError = 9 , UnicodeError = 10 , StandardExtension = 11 , ConnectionError = 12 , UnsupportedVolumeSpacing = 13 , InvalidFileFormat = 14 , PacsConnectionError = 15 , UnsupportedExport , InvalidExportInput , NetworkError = 18 , NetworkAuthError = 19 , Unknown = 99 } |
Error code. More... | |
enum class | Type : int { Warn = 0 , Err = 1 , Fatal } |
Type/severity of the error. More... | |
Public Member Functions | |
Error (Code code, Type type, const std::string &details, TagProxy tag=TagProxy()) | |
Default constructor. | |
Public Attributes | |
Code | code |
Error code. | |
Type | type |
Type/severity of the error. | |
std::string | details |
Additional information on the error. | |
TagProxy | tag |
DICOM Tag that caused the error. This is only set for certain Codes (e.g. all containing 'ElementValue'). Might also be empty if the error is caused by a combination of multiple tags. | |
|
strong |
Error code.
Enumerator | |
---|---|
MissingMandatoryElement | An element that is consider mandatory is missing from the dataset. |
InvalidElementValue | An element has an invalid value according to the standard. |
UnsupportedElementValue | An element has a value that is valid according to the standard but is currently not supported. |
UnsupportedSOPClass | The SOP class of the dataset is not explicitly support and might be loaded by a fallback loader. |
UnsupportedPerFrameElement | Not used at the moment. Might be removed in the future. |
FileNotFound | The given file does not exist or cannot be opened for reading or writing. |
UnsupportedImageType | The ImageType (0008, 0008) is not explicitly supported. |
InvalidPath | The given path is not valid in the current context, e.g. passing a file when a folder is required. |
InternalError | An error that should not occure and is most likely a bug or a not considered edge case. |
UnicodeError | Some values could not be converted to UTF-8 and might be displayed wrong. |
StandardExtension | Some tags or values are loaded with non-standard compliant behaviour. |
ConnectionError | The PACS connection could not be established. |
UnsupportedVolumeSpacing | Dataset looks like a volume but e.g. has unsupported non-uniform spacing. |
InvalidFileFormat | The file cannot be loaded as a DICOM file. It might be corrupt or just not a DICOM file. |
PacsConnectionError | A PACS connection could not be established or the PACS server refused the request. |
UnsupportedExport | The given image can currently not be exported to DICOM. The reason might be an unsupported modality or image dimension among other things. |
InvalidExportInput | The input for exporting is missing some mandatory information, e.g. a DataComponent that is required for a particular SOP but is not present. |
NetworkError | A network error occured while receiving something through DICOMweb. |
NetworkAuthError | A network request failed due to wrong or missing authentication. |
Unknown | Anything that is not covered by the above errors. Extensions might use custom error code starting from 100. |
|
strong |
Type/severity of the error.
Default constructor.
code | Error code. |
type | Type/severity of the error. |
details | Additional information on the error. |
tag | DICOM Tag that caused the error (defaults to emtpy tag). |