[vtkusers] imagereader2 bugs.

hossein hossein9876 at gmail.com
Mon Oct 13 15:44:30 EDT 2008


hi mathieu,
Thank you for your answer.
by using vtkbmpreader only one of my problems was solved (the
visualized object is correct). The following problems still exist:
a- vtkbmpreader->SetDataExtent(e1,e2,e3,e4,e5,e6);  It makes no
difference what i put for e1-e4 the class always uses the full extent
of the x and y dimensions of the images.

b-when i use vtk 5.2 i get the same debugging page and "unhandled
win32 exception".

any help will be appreciated.

regards,
Hossein

On 10/13/08, Mathieu Malaterre <mathieu.malaterre at gmail.com> wrote:
> This is not a bug in VTK, you need to use vtkBMPReader to read bmp.
>
> http://www.vtk.org/Wiki/VTK_FAQ#What_image_file_formats_can_VTK_read_and_write.3F
>
>
>
> On Mon, Oct 13, 2008 at 2:06 PM, hossein <hossein9876 at gmail.com> wrote:
>> 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
>>
>>
>>
>>
>> _______________________________________________
>> This is the private VTK discussion list.
>> Please keep messages on-topic. Check the FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
>>
>
>
>
> --
> Mathieu
>



More information about the vtkusers mailing list