<div dir="ltr">Hi,<br><br>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.<br>After creating an instance of the class i implement the code like this:<br>
<br>static vtkImageReader2 *vbitmap2 = vtkImageReader2::New();<br>.<br>.<br>.<br><br>vbitmap2->SetDataExtent(0,139,0,85,1,84);<br><br>and the result is a correct visualization.<br><br>for a dataset with size: 337*364*112 if i follow the above rule i have to write:<br>
vbitmap2->SetDataExtent(0,337,0,364,1,112);<br>The bad thing is i dont get a correct visualization. So i wrote it like this:<br>vbitmap2->SetDataExtent(0,338,0,365,1,112); //add 1 to x and y extent<br>i still dont get a correct result.<br>
So i wrote the code like this:<br>vbitmap2->SetDataExtent(0,339,0,366,1,112); //add 2 to x and y extent<br>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.<br>
This is really nutting me out.<br>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.<br>im using ms visual studio 2008 sp1. Normal console application.<br>
any help will be appreciated.<br>regards<br>hossein<br><br><br><br></div>