Skip to content

Add segment for background if required.#534

Open
michaelonken wants to merge 1 commit intomasterfrom
Fix_Background_in_converted_Labelmaps
Open

Add segment for background if required.#534
michaelonken wants to merge 1 commit intomasterfrom
Fix_Background_in_converted_Labelmaps

Conversation

@michaelonken
Copy link
Copy Markdown
Member

When converting DICOM binary segmentations to DICOM labelmaps, some pixels are likely not covered from any of the the segments. Since the pixels are initially set to 0, all non-covered pixels will be "background" and must be marked as such.

This is done by scanning all pixels after conversion and if a 0 is found, a segment using codes for denoting "background" will be inserted automatically.

The alternative would be to set Pixel Padding Value. This could be introduced as an option later, but for now the background segment seems to be better supported by consuming applications.

When converting DICOM binary segmentations to DICOM labelmaps,
some pixels are likely not covered from any of the the segments.
Since the pixels are initially set to 0, all non-covered pixels
will be "background" and must be marked as such.

This is done by scanning all pixels after conversion and if a 0 is
found, a segment using codes for denoting "background" will be inserted
automatically.

The alternative would be to set Pixel Padding Value. This could be
introduced as an option later, but for now the background segment
seems to be better supported by consuming applications.
@sonarqubecloud
Copy link
Copy Markdown

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.

1 participant