Hi,

I noticed that SVN head change mitkImageMapper2D.cpp to determine
an image is binary image or not, but there is a bug in line
if((image->GetScalarValueMax()==1 &&
image->GetScalarValue2ndMax()==0)||(image->GetScalarValueMin()==0 &&
image->GetScalarValue2ndMin()==1) ) // decides whether the object is a
binary

If a dicom image has pixel value 0,1, ..., 1023, 1024. Then the
first part is false
(image->GetScalarValueMax()==1 && image->GetScalarValue2ndMax()==0)
but the second part is true
(image->GetScalarValueMin()==0 && image->GetScalarValue2ndMin()==1)
and wrongly determine it is a binary image.

And usually binary image is not well defined, it usually has two value 0 and
1,
but in fact 0 and 255 are usually used to display images. If the condition
can be
there are two values, one is 0, and the other is 1 or 255, it is a binary
image.

Fucang
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to