Page 1 of 1

imagemagick7: bug in dicom reader?

Posted: 2016-07-29T05:31:18-07:00
by jcupitt
Hi, I'm updating my image read class to work with im7 and I think I might have found a bug in the dicom reader. This is in 7.0.2-5.

Here is a 128x128 unsigned 16-bit image (a slice from a PET scan):

https://github.com/jcupitt/libvips/blob ... _image.dcm

If I PingImage() I see:

Code: Select all

vips_foreign_load_magick7_file_header: PingImage()
image->depth = 8
GetImageType() = 6
	TrueColorType
GetPixelChannels() = 3
image->columns = 128
image->rows = 128
image has 1 frames
If I ReadImage() I see:

Code: Select all

vips_foreign_load_magick7_file_load: ReadImage()
image->depth = 16
GetImageType() = 2
	GrayscaleType
GetPixelChannels() = 2
image->columns = 128
image->rows = 128
image has 1 frames
I'd obviously like the two to match to I can allocate memory correctly.

Re: imagemagick7: bug in dicom reader?

Posted: 2016-08-04T04:48:03-07:00
by jcupitt
I had a quick look at dcm.c and I don't think it'll ever support Ping properly.

Please ignore this thread.