OK. Here are the details.
1. I am expecting some thing like attached "expected_image.png". And the images, I am getting as per my below code (# 3) are attached, with same names.
2. I am expecting to see those two white spots(guess its ankle) in the black background, as in the expected_image.png. But, this is what I am getting.
Try1. Just dcm.image without any option and normalize, I will get to see the image but kind of overlay exists ( "image_try1.jpg").
Try2. level and remap options with normalize. Complete black bg with two white patches. ( "image_try2.jpg").
Try3. only remap option with normalize. Textured bg with two white patches. ( "image_try3.jpg").
Try4. Only normalize without any option. Complete white image. Nothing visible. ( "image_try4.jpg").
3. Here is the code.
require 'dicom'
require 'RMagick'
include Magick
include DICOM
dcm = DObject.read("IM-0001-0001.dcm")
#Try1: defualt image, without any option
image_try1 = dcm.image
image_try1.write("image_try1.jpg")
#Try2: level and remap option with normalize
image_try2 = dcm.image(:level => [20, 400], :remap => true)
image_try2.normalize.write("image_try2.jpg")
#Try3: only remap option with normalize
image_try3 = dcm.image(:remap => true)
image_try3.normalize.write("image_try3.jpg")
#Try4: defualt image, without any option normalized
image_try4 = dcm.image
image_try4.normalize.write("image_try4.jpg")
System specs.
ruby-dicom V 0.9.5, ImageMagick V 6.7.7-10, Ruby V 1.9.3p385 on Ubuntu 12.10.
Regards,
Vijendra