Page MenuHomePhabricator

int64 not supported
Closed, DuplicatePublic

Description

I would like to view segmentations from the 2021 KiTS challenge (https://kits21.kits-challenge.org/). These are saved as int64. MITK cannot open these segmentations.
In python, SimpleITK is able to read the segmentations just fine:

import SimpleITK as sitk
a = sitk.GetArrayFromImage(sitk.ReadImage('kidney_instance-2_annotation-3.nii.gz'))
print(a.dtype)

dtype('int64')

Since MITK is based on ITK (same as SimpleITK) I would assume that is should be able to load the segmentation as well? Or is MITK a 32bit program?

I can convert the segmentations to int32 or uint32 in python and then they can be read by MITK, but this seems like a thing not every MITK user will want to or be able to do :-)

image.png (22×438 px, 6 KB)

Ubuntu 18.04

Best,

Fabian

Event Timeline

kislinsk triaged this task as Wishlist priority.Wed, Sep 15, 4:39 AM
kislinsk added subscribers: kleina, kislinsk.

@kleina already tried to add int64 as supported image type but it didn't work out of the box AFAIK. In theory it should be enough to add the type to the MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES CMake variable. If we would be able to make this work, compilation time and binary size would increase noticeably, though, because of the templated nature of ITK.

Not an excuse but I wonder why anyone would want to store a segmentation in int64 in the first place. It seems like this would be one of the most unfitting types somebody could come up with.

True, I tried this. There is even a task for it: T28557

The straightforward solution did not work for me. But I am willing to discuss this again.