|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Records the reasons why a DICOM volume was split during loading. More...
#include <mitkIOVolumeSplitReason.h>

Public Types | |
| enum class | ReasonType { Unknown , ValueSplitDifference , ValueSortDistance , ImagePostionMissing , OverlappingSlices , GantryTiltDifference , SliceDistanceInconsistency , MissingSlices } |
| Enumeration of possible reasons for splitting a DICOM volume. More... | |
| using | Self = IOVolumeSplitReason |
| using | Pointer = std::shared_ptr< IOVolumeSplitReason > |
| Shared pointer type. More... | |
| using | ConstPointer = std::shared_ptr< const IOVolumeSplitReason > |
| Shared pointer to const type. More... | |
Public Member Functions | |
| void | AddReason (ReasonType type, const std::string &detail="") |
| Add a split reason with optional detail text. More... | |
| void | RemoveReason (ReasonType type) |
| Remove a previously added split reason. More... | |
| bool | HasReasons () const |
| Check whether any split reasons have been recorded. More... | |
| bool | HasReason (ReasonType type) const |
| Check whether a specific reason type has been recorded. More... | |
| std::string | GetReasonDetails (ReasonType type) const |
| Get the detail string for a specific reason type. More... | |
| Pointer | ExtendReason (ConstPointer otherReason) const |
| Clone this instance and extend it with reasons from another instance. More... | |
| Pointer | Clone () const |
| Create a deep copy of this instance. More... | |
Static Public Member Functions | |
| static nlohmann::json | ToJSON (ConstPointer reason) |
| Serialize a split reason to JSON. More... | |
| static Pointer | FromJSON (const nlohmann::json &j) |
| Deserialize a split reason from JSON. More... | |
| static std::string | TypeToString (ReasonType reasonType) |
| Convert a ReasonType to its string representation. More... | |
| static IOVolumeSplitReason::ReasonType | StringToType (const std::string &reasonStr) |
| Convert a string representation to a ReasonType. More... | |
| static Pointer | New () |
| Create a new, empty IOVolumeSplitReason instance. More... | |
Protected Types | |
| using | ReasonMapType = std::map< ReasonType, std::string > |
| Map storing reason types and their associated detail strings. More... | |
Protected Attributes | |
| ReasonMapType | m_ReasonMap |
Records the reasons why a DICOM volume was split during loading.
When DICOM series are loaded, the reader may need to split the input files into multiple volumes. This class captures the specific reasons for each split, along with optional detail strings providing additional context (e.g., the detected distance inconsistency or number of missing slices).
Reasons are stored as a map from ReasonType to a detail string and can be serialized to/from JSON for persistence.
Definition at line 41 of file mitkIOVolumeSplitReason.h.
| using mitk::IOVolumeSplitReason::ConstPointer = std::shared_ptr<const IOVolumeSplitReason> |
Shared pointer to const type.
Definition at line 48 of file mitkIOVolumeSplitReason.h.
| using mitk::IOVolumeSplitReason::Pointer = std::shared_ptr<IOVolumeSplitReason> |
Shared pointer type.
Definition at line 46 of file mitkIOVolumeSplitReason.h.
|
protected |
Map storing reason types and their associated detail strings.
Definition at line 157 of file mitkIOVolumeSplitReason.h.
Definition at line 44 of file mitkIOVolumeSplitReason.h.
|
strong |
Enumeration of possible reasons for splitting a DICOM volume.
Definition at line 53 of file mitkIOVolumeSplitReason.h.
| void mitk::IOVolumeSplitReason::AddReason | ( | ReasonType | type, |
| const std::string & | detail = "" |
||
| ) |
Add a split reason with optional detail text.
| [in] | type | The reason type to add. |
| [in] | detail | Optional detail string providing context (e.g., numeric values). |
If the reason type already exists, its detail is overwritten.
| Pointer mitk::IOVolumeSplitReason::Clone | ( | ) | const |
Create a deep copy of this instance.
| Pointer mitk::IOVolumeSplitReason::ExtendReason | ( | ConstPointer | otherReason | ) | const |
Clone this instance and extend it with reasons from another instance.
Creates a copy of this object, then adds any reason types from otherReason that are not already present in this instance. Existing reason types are not overwritten.
| [in] | otherReason | The other instance whose reasons to merge. |
otherReason must point to a valid instance.
|
static |
Deserialize a split reason from JSON.
| [in] | j | The JSON value to parse. |
| std::string mitk::IOVolumeSplitReason::GetReasonDetails | ( | ReasonType | type | ) | const |
Get the detail string for a specific reason type.
| [in] | type | The reason type to query. |
| mitk::Exception | if the reason type is not present. |
| bool mitk::IOVolumeSplitReason::HasReason | ( | ReasonType | type | ) | const |
Check whether a specific reason type has been recorded.
| [in] | type | The reason type to look for. |
true if the given reason type is present. | bool mitk::IOVolumeSplitReason::HasReasons | ( | ) | const |
Check whether any split reasons have been recorded.
true if at least one reason is present.
|
static |
Create a new, empty IOVolumeSplitReason instance.
| void mitk::IOVolumeSplitReason::RemoveReason | ( | ReasonType | type | ) |
Remove a previously added split reason.
| [in] | type | The reason type to remove. No-op if not present. |
|
static |
Convert a string representation to a ReasonType.
| [in] | reasonStr | The string identifier to parse. |
Referenced by mitk::from_json().
|
static |
Serialize a split reason to JSON.
| [in] | reason | The instance to serialize (must not be nullptr). |
| mitk::Exception | if reason is nullptr. |
|
static |
Convert a ReasonType to its string representation.
| [in] | reasonType | The reason type to convert. |
Referenced by mitk::to_json().
|
protected |
Definition at line 158 of file mitkIOVolumeSplitReason.h.