[vtkusers] imagereader2 bugs.

hossein hossein9876 at gmail.com
Mon Oct 13 08:06:16 EDT 2008


Hi,

I'm using the class imagereader2 for visualization (vtk 5.0.2). The input
are bitmap images. one of my datasets size is as following:139*85*84.
After creating an instance of the class i implement the code like this:

static vtkImageReader2 *vbitmap2 = vtkImageReader2::New();
.
.
.

vbitmap2->SetDataExtent(0,139,0,85,1,84);

and the result is a correct visualization.

for a dataset with size: 337*364*112 if i follow the above rule i have to
write:
vbitmap2->SetDataExtent(0,337,0,364,1,112);
The bad thing is i dont get a correct visualization. So i wrote it like
this:
vbitmap2->SetDataExtent(0,338,0,365,1,112); //add 1 to x and y extent
i still dont get a correct result.
So i wrote the code like this:
vbitmap2->SetDataExtent(0,339,0,366,1,112); //add 2 to x and y extent
And i get a correct result. In some datasets i get a correct result if i add
1 and in some if i reduce 1 from the original x and y dimensions.
This is really nutting me out.
I downloaded vtk 5.2 with the hope that this bug has been fixed. I compiled
the same code and ...... Visual studio says the application must be
debugged. I dont know what to do.
im using ms visual studio 2008 sp1. Normal console application.
any help will be appreciated.
regards
hossein
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081013/0fa609d2/attachment.htm>


More information about the vtkusers mailing list