-
Recently I started to try to implement worklist client in In pynetdicom when I use this keys which create data element
I see in server side(orthantc) this:
In dicom-rs I wanted to do same thing, patient id and patient name is patient id is simple to use
For start date I created something like
but push prints error
How can I mimic python behaviour? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The items within a sequence need to be objects themselves, rather than data elements. So the way to go would be creating the full nested data set as an independent DICOM object: let scheduled_procedure_step_sequence_set = InMemDicomObject::from_iter([
DataElement::new(
tags::SCHEDULED_PROCEDURE_STEP_START_DATE,
VR::LO,
PrimitiveValue::from("19951015"),
)
]); Then you can add this as a single item to the sequence: let e = DataElement::new(
tags::SCHEDULED_PROCEDURE_STEP_SEQUENCE,
VR::SQ,
Value::new_sequence(smallvec![scheduled_procedure_step_sequence_set], Length::UNDEFINED),
);
obj.push(e); There could be easier ways to do this in the future, maybe starting with a path-like syntax for DICOM data set traversal. |
Beta Was this translation helpful? Give feedback.
-
New error looks better, but still I cannot find way to compile this:
prints error
|
Beta Was this translation helpful? Give feedback.
Hmm, it's a type mismatch in the DICOM object type parameters. The first one is for nested data sets, the second one for pixel data fragments. The helper constructor
new_sequence
is being unnecessarily strict right now, so the way to fix this is to build the sequence value manually.