-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dimensions of volume and segmentations are not matching #513
Comments
This is expected, and it is a very common question. DICOM segmentations are represented as a set of frames (slices) - not as a single 3D volume. Those individual frames include geometry information that can be used to order them and reconstruct the segmented volume. For the sake of reducing file size while encoding SEG, frames that do not contain any segmented pixels are often skipped and are not included. As a result, when you have empty image slices above and/or below (which is often the case) the segmented slices, they will not be included. When DICOM SEG is converted by Does it make sense? |
Resampling to match the voxel space, or literally adding empty slices on
top and bottom? As I see it those are two different operations
…On Mon, Jan 13, 2025 at 22:29 Andrey Fedorov ***@***.***> wrote:
This is expected, and it is a very common question.
DICOM segmentations are represented as a set of frames (slices) - not as a
single 3D volume. Those individual frames include geometry information that
can be used to order them and reconstruct the segmented volume. For the
sake of reducing file size while encoding SEG, frames that do not contain
any segmented pixels are often skipped and are not included. As a result,
when you have empty image slices above and/or below (which is often the
case) the segmented slices, they will not be included.
When DICOM SEG is converted by segimage2itkimage, only the slices present
in SEG will appear in the output representation. If you want the
segmentation geometry to match that of the segmented image, you will need
to augment the segmentation image with the empty slices above/below, which
is easiest done by resampling segmentation to the volume of the segmented
image.
Does it make sense?
—
Reply to this email directly, view it on GitHub
<#513 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWDP6QAQHJDDIOYE7VIMT332KQV37AVCNFSM6AAAAABVDPF2VWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBYGI2TKOBZGY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
If you do resampling to the raster of the segmented image with nearest neighbor interpolator (using ITK, as an example), the result should be identical to adding empty slices, but you will not need to worry about the code being error-prone while accounting for differences in image orientation (perhaps among other possible complexities). |
Following on the same public dataset of #512
I get non-matching dimensions between the CT volumes and the labels after running segimage2itkimage
The text was updated successfully, but these errors were encountered: