Page MenuHomePhabricator

2d images can no longer be saved as bmp
Closed, ResolvedPublic

Description

due to the change in the mitk geometry handling, imported fluoroscopy images are handled as 3D images. when saving them as BMP the BMPImageIO complains that images with a dimension != 2 cannot be saved

Event Timeline

muellerm added a subscriber: muellerm.

p.s.: bug has nothing to do with fluoroscopy images but rather with the 2d images in general

.bmp:

  • It only occurs for 2D images that are saved as 3D with single slice.
  • It works for images that also have a 2D Geometry.

.png, .tiff and .jpg:

  • mitkImageFileWriter is using mitkItkPictureWrite instead and it works for all geometries for saving but not .bmp

*no chance to edit a comment*

Can be fixed by using mitkItkPictureWrite

New remote branch pushed: bug-15820-save-2D-images-as-bmp

We also changed the mitkImageWriterTest to cover all supported picture formats.
During the implementation we've noticed that PixelType comparison won't work for this. Not all of the bit sizes can be used. E.g. PNGs max bit size for grayscale images is 16. So the images won't have the same PixelType after saving and loading again.

[659952]: Merge branch 'bug-15820-save-2D-images-as-bmp'

Merged commits:

2013-08-14 16:28:11 Tobias Schroeder [d4d730]
Check all support picture formats.

Changed ImageWriterTest to check BMP, PNG, JPG and TIFF.


2013-08-14 13:55:03 Tobias Schroeder [60bcfc]
Use itkImageSerieswWriter for bmp files.

There was a problem with saving 2D images as bmp that are converted to 3D with a
single slice. Now saving as bmp behaves like saving png, jpg or tiff.