Bug in BMPReader???

Harrow, Matthew MHarrow at carolinas.org
Fri Jul 23 11:42:32 EDT 1999


I am trying to make calculations based on the rgb values of the pixels, but
have noticed some of the pixel data is being changed somewhere between
BMPReader....ExtractComponents...Image ToStructuredPoints... and ..
ImageData->GetScalarPointer(). In some files, it seems that a couple of
extra data points are added or two are skipped. I extract the scalars
thinking red = scalar(0), green =scalar(1) and blue = scalar(2), however the
ouput is blue= scalar(0), red = scalar(1), and green = scalar(2) with red
and green having an index that points to the previous column. For example at
a given x-y location the rgb values will read r(x,y)= actual g(x-1,y),
g(x,y)=actual b(x-1,y),and  b(x,y)=actual r(x,y).

The real problem is that the error does not occur in all files. I understand
there is a header in BMP files that can indicate several different data
formats. Is there a way I can change the header of the files I have problems
with?

Thanks,
-Matt





Matthew E. Harrow
Orthopaedic Engineering
Carolinas Medical Center
(704)355-7084
mharrow at carolinas.org



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list