[vtkusers] imagereader2 bugs.

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Oct 13 09:14:45 EDT 2008


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