Skip to content

Ignore invalid DICOM values when writing DICOM.#530

Open
michaelonken wants to merge 1 commit intomasterfrom
disable_dicom_value_checks
Open

Ignore invalid DICOM values when writing DICOM.#530
michaelonken wants to merge 1 commit intomasterfrom
disable_dicom_value_checks

Conversation

@michaelonken
Copy link
Member

This applies to writing DICOM segmentation and parametric map objects which import some basic information (on Patient, Study and FoR level) from DICOM input images. Since imported attributes can be broken but often outside the control of the caller, it is now possible to ignore broken values in these attributes when writing out the result objects.

The affected tools are itkimage2segimage and itkimage2paramap and the option is called --noDicomValueChecks.

This PR is about to close #232.

This applies to writing DICOM segmentation and parametric map objects
which import some basic information (on Patient, Study and FoR level)
from DICOM input images. Since imported attributes can be broken
but often outside the control of the caller, it is now possible
to ignore broken values in these attributes when writing out the
result objects.

The affected tools are itkimage2segimage and itkimage2paramap and
the option is called --noDicomValueChecks.

This PR is about to close #232.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 2, 2026

@fedorov
Copy link
Member

fedorov commented Mar 2, 2026

Per discussion with @michaelonken, we do not need to do anything for tid1500writer, since DcmFileFormat::saveFile used there will fail only on hard parsing errors, and will write any problematic values without complaining.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow user to force writing out datasets with "inherited" invalid attributes

2 participants