![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Dicom/DicomSequence.h>
Abstract base class for a sequence of elements. More...
Abstract base class for a sequence of elements.
Public Member Functions | |
SequenceBase (ElementList &parent, DcmTag tag, ElementBase::Type type) | |
SequenceBase (DcmItem &item, DcmTag tag, ElementBase::Type type) | |
virtual void | checkErrors (bool ignoreMandatory=false) const =0 |
Checks the sequence for errors. | |
![]() | |
ElementBase (ElementList &parent, DcmTag tag, Type type=Conditional, bool searchIntoSubs=false) | |
ElementBase (DcmItem &item, DcmTag tag, Type type=Conditional, bool searchIntoSubs=false) | |
void | setCondition (std::function< bool()> predicate) |
Sets a callback function that determines if a conditional element is mandatory. | |
virtual DcmTag | tag () const |
DICOM tag wrapped by this Element. | |
virtual bool | isMandatory () const |
Evaluates whether this element is mandatory (based on the specified type and optionally condition). | |
virtual bool | exists () const |
Returns true if the elements exists in the dataset. | |
virtual bool | isValid () const =0 |
Returns true if the element exists and is in a valid range. | |
void | remove () |
Removes the element from the dataset. | |
std::string | valueString () const |
Returns the value of the element as a string. | |
void | setTargetSequence (DcmItem *sequence) |
Sets an optional sequence item where this elements will write its value. | |
![]() | |
virtual void * | registerErrorHandler (ErrorCallback handler) |
Registers a new handler callback function. | |
virtual void | unregisterErrorHandler (void *handler) |
Removes a previously registered handler again. | |
void * | forwardErrors (const ErrorRecorder *otherRecorder) |
Convenient function to forward all errors registered to this recorder to another recorder. | |
virtual void | registerError (const Error &error) const |
Sends the given error to all error handler callbacks. | |
void | registerError (Error::Code code, Error::Type type, const std::string &details, TagProxy tag=TagProxy()) const |
Additional Inherited Members | |
![]() | |
enum | Type { Mandatory , Conditional } |
Conditionality of an Element. More... | |
![]() | |
using | ErrorCallback = std::function<void(const Error&)> |
Alias for a function to call for each error recorded. | |
![]() | |
DcmItem & | m_dataset |
DICOM data set/base element to retrieve element data from. | |
DcmItem * | m_targetSeq |
Optional sequence to write element data to; only used for setValue(). | |
DcmTag | m_tag |
DICOM tag the Element refers to. | |
Type | m_type |
Conditionality of the Element. | |
bool | m_searchIntoSubs |
Flag whether to search into sub sequences or not. | |
std::function< bool()> | m_typeCondition |
Optional predicate function to evaluate conditionality. | |
|
pure virtual |
Checks the sequence for errors.
This assures that all mandatory and conditional elements are present and that all existing elements have a valid value. If ignoreMandatory is true, missing mandatory elements are not counted as errors (e.g. useful when the sequence itself is optional).
Implemented in Sequence< T >, Sequence< ImFusion::CT::XrayFunctionalGroups::XrayFunctionalGroupMacro >, Sequence< ImFusion::CT::XrayPositioning::ZiehmImageSpotPositionSequence >, Sequence< ImFusion::Dicom::EnhancedMultiFrameImageIOD::DimensionIndexSequenceItem >, Sequence< ImFusion::Dicom::EnhancedMultiFrameImageIOD::FunctionalGroupMacro >, Sequence< ImFusion::Dicom::EnhancedMultiFrameImageIOD::FunctionalGroupMacro::FrameContentSequenceItem >, Sequence< ImFusion::Dicom::EnhancedMultiFrameImageIOD::FunctionalGroupMacro::SegmentIdentificationSequenceItem >, Sequence< ImFusion::Dicom::ImagePlane::DetectorInformationSequence >, Sequence< ImFusion::Dicom::ModalityLUT::LutItem >, Sequence< ImFusion::Dicom::SegmentItem >, Sequence< ImFusion::Dicom::SegmentItem::SegmentedPropertyCode >, Sequence< ImFusion::Dicom::VOILUTExtension::VOILUT::LutItem >, and Sequence< ImFusion::US::DicomGeVividE9IOD::VividVolumeGroupItem >.