Page MenuHomePhabricator

Cannot load segmentations from KITS challenge due to unknown pixel type
Open, NormalPublic


@d246a informed me, that she is not able to load the segmentation niftis provided in the dataset of the KITS challenge. The error message is:

image.png (139×466 px, 71 KB)

I checked the files with a simple python script and it turned out, that the value type is 64-bit signed integer, which we do not support yet.
A quick workaround was to convert the segmentations using this script:

import os
import SimpleITK as sitk

root = "/home/kleina/E132-Projekte/temp_data/dtrofimova/kits2021/case_00000/segmentations"

filename = 'artery_instance-1_annotation-1.nii.gz'
filename_out = 'output.nii.gz'

file_to_load = os.path.join(root, filename)
outputImageFileName = os.path.join(root, filename_out)

input_image = sitk.ReadImage(file_to_load)


cast_image = sitk.Cast(input_image, sitk.sitkInt8)

sitk.WriteImage(cast_image, outputImageFileName)

A possible solution could be to add the value type to the supported ones in cmake (MITK_ACCESSBYITK_INTEGRAL_PIXEL_TYPES).

Related Objects

Event Timeline

kleina created this task.

I tried to add

long long

to the list. That caused my superbuild to crash. Then I added


The superbuild worked, but now the workbench crashes during the load attempt with:

!21.610! [VtkGenericWarning] WARNING: Generic Warning: In /media/kleina/Data/dev_ubuntu/mitk_dev2/bin/ep/src/VTK/Imaging/Core/vtkImageReslice.cxx, line 1420
Support for VTK_LONG not compiled.
2021-06-17 15:49:54.509 ( 175,486s) [        91B3B700]    vtkImageReslice.cxx:1651  WARN| Support for VTK_LONG not compiled.

This task is still open and still on the workboard. I am removing myself as an assignee, what I did was basically reporting and a bit of investigation as written above.