[Fwd: Re: [Insight-users] pixelType and grayscale]
Luis Ibanez
luis.ibanez at kitware.com
Tue Dec 20 10:48:45 EST 2005
Hi Romain,
A pixel type =
unsigned char
*is*
8 bits.
From the description of your problem, it seems that what
you are facing is a problem with the intensity range of
the data in your image.
Please do the following:
1) Connect a MaximumMinimumImageCalculator to the image
and find the max an min values of the image before
you send it to the file.
2) Post the values that you find to the list.
Thanks
Luis
--------------------
Romain Lebel wrote:
> Hi luis thanks for taking time to answer
>
> I'm using the resampling filter not the rescaler. In my images (not
> medical) the intensity aren't close to 1.
>
> if i put unsigned char in the output image type of the resampling filter
> the result is the same
>
> is there any filter that forces an image to be a 8 bits image?
> Should i try the caster filter with unsigned int as output pixel type?
>
> Luis Ibanez a écrit :
>
>>
>> Hi Romain,
>>
>> You don't need a caster at the output of a rescale intensity filter.
>>
>> Simply declare the rescale intensity filter to have the pixel type
>> that you want on the output image.
>>
>> It is likely that your images have pixel values close to 1 and
>> look to dark when viewed in the dynamic range of 0-255.
>>
>> You may want to use the ImageViewer that is available in
>>
>>
>> InsightApplications/ImageViewer
>>
>> This simple viewer will take into account pixel spacing and will
>> normalize the dynamic range of the image for display.
>>
>>
>> BTW:
>> You should avoid using BMP as a format for medical images.
>>
>>
>>
>> Regards,
>>
>>
>> Luis
>>
>>
>> --------------------
>> Romain Lebel wrote:
>>
>>>
>>> I save Them as bmp
>>>
>>> when i visualize them they are in greyscale but in the file format
>>> they are in rgb not in 8 bits
>>> i vizualize them with windows or image J
>>>
>>> i use the cast filter on a resample filter output
>>> the input of the writer is the caster ouput
>>>
>>>
>>>
>>> Luis Ibanez a écrit :
>>>
>>>>
>>>> Hi Romain,
>>>>
>>>>
>>>> Using unsigned char for pixel type should be enough.
>>>>
>>>>
>>>> * What are you using for visualizing your images ?
>>>>
>>>> * What file format are you using ?
>>>>
>>>> * What do you observe in your images after saving them ?
>>>> are they black ?
>>>> are they binary ?
>>>> are they noisy ?
>>>>
>>>>
>>>>
>>>> Please provide more information.
>>>>
>>>>
>>>> Thanks
>>>>
>>>>
>>>> Luis
>>>>
>>>>
>>>>
>>>> -------------------
>>>> Romain Lebel wrote:
>>>>
>>>>> Hi every one!
>>>>>
>>>>> I can't get my images to be grascale when i save them
>>>>> I'm using unsigned char as pixel type
>>>>> What else should i do to get 8bits grayscale image saved ?
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
More information about the Insight-users
mailing list