imagemagick7: bug in dicom reader?

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
jcupitt
Posts: 26
Joined: 2011-04-26T05:14:01-07:00
Authentication code: 8675308

imagemagick7: bug in dicom reader?

Post 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.
jcupitt
Posts: 26
Joined: 2011-04-26T05:14:01-07:00
Authentication code: 8675308

Re: imagemagick7: bug in dicom reader?

Post 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.
Post Reply