Import bmp data into 3D Slicer

Hello,

I am brand new to slicer 3D. I have a series of .bmp images from a micro-ct from bruker (skyscan).

I am trying to import them into slicer 3D but keep getting the error:

Error: Loading C:/Users/tommy/Desktop/images/1_image0000_voi__bin_0550.bmp - load failed.

Cant slicer3D load .bmp images? Am I missing something?

I clicked on DataChoose Files(s) to Add → loaded a file → ticked Show Options → unticked Single File

Kind Regards

I’ve just tested this and in the latest Slicer Stable Release (Slicer-5.0.3) and it worked well. Most likely that the issue is that one of the bmp files in the folder have different size or their naming scheme cannot be detected automatically.

To load image stacks, I would recommend to use ImageStacks module in SlicerMorph extension, as it is much faster, more robust, and offers quick preview and cropping.

Hello Mr Lasso,

Unfortunatly, I am not able to it. I noticed that I cannot even import 1 image.
I had to convert the images with imageJ to another format (tiff) and then I could load them into slicer3D.
Thanks for the help

Can you upload a few example bmp images somewhere and post the link here?

I will leave one example here: WeTransfer - Send Large Files & Share Photos Online - Up to 2GB Free

Thanks for the support!

I tried this image and also got it to fail to load in Slicer. It seems to be a bit depth issue:

  • The bmp @Trailer shared has a bit depth of 1.
  • Converting the image to 24 bit or 256 bit BMP made it load into slicer without trouble
  • Probably Slicer uses vtkBMPReader to read the image, and when I feed the original image into a program that only calls vtkBMPReader I get the error
    2022-09-04 22:02:36.386 (   0.005s) [        DED6B780]       vtkBMPReader.cxx:212    ERR| vtkBMPReader (0x55aadaaf69d0): Only BMP depths of (8,24) are supported. Not 1
    
    So it’s vtkBMPReader’s limitation, but Slicer is still failing to report this error message properly. In Slicer I just get
    Error: Loading /home/ebrahim/Desktop/image_770.bmp -  load failed.
    
    rather than the informative VTK error. So the error reporting aspect is a Slicer issue

Slicer uses ITK to load images. You can report this to ITK to see if they are willing to extend ITK to support such bmp images. Since bmp format is rarely used nowadays and binary variant is even more of a niche, they will probably not give high priority for this development, so you might need to wait for some funded project to require this, or contribute developer time or funding yourself. I would recommend exporting in a more commonly used file format, such as png or tiff.

1 Like

@Trailer Hi, I happen to work with skyscan and 3d slicer. I did a work around and Downloaded a DICOM converter. Then import DICOM. Or use image j, open bmp sequence and save as nrrd file.

SlicerMorph has a Skyscan importer module it may worth a try.

@muratmaga do you have any advice on reading such images?

Unfortunately no. Never worked with binary BMPs before.