[vtkusers] vtkImageReader2 slow

T.R.Shashwath trshash at gmail.com
Sat Feb 2 05:29:17 EST 2008


On Friday 01 Feb 2008 11:43:58 pm Prashanth wrote:
> All,
>         I'm reading a 512 x 512 x 176 image volume using
> vtkImageReader2. I'm using Python ( reading in an image volume is the
> first step in my GUI and therefore I'm using Python and TkInter). I did
> timings using vtkTimerLog with start/stop just around the "reader
> Update" line of code and it took me 136.6 seconds to read in the image
> volume. Here's some additional info. :  Image Data Type = Unsigned Short
> and Size = 90,112 Kb and I'm using Windows with VTK built using
> Microsoft Visual Studio 2005.
>     I did make sure that my Python Wrapping variable (PYTHONPATH) was
> pointing to the Release libraries and I used the ReleaseDataFlagOn for
> vtkImageReader2. The image is stored on a different drive and I have
> mapped the drive to my computer using Windows' "Map Network drive". I'm
> on a 10Mbps network and I have 1Gb of RAM on my computer. 136 seconds
> still seems too long to read in a relatively small data set. Can someone
> help me figure out what's going on and help me speed up the process ?
> Thanks
> Prashanth
>
> _______________________________________________
> 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

Hi,

You should probably check a couple of things:
1) Is the dataset in text or binary format? I've found that a binary can be a 
few orders of magnitude faster than a text format file, because there's no 
parsing involved.
2) A 10 Mbit line means nothing more than 1.25 MB/s - which would indicate 
about 70 seconds just for the transfer, leave alone parsing and rendering. 
Try copying the file locally and opening again.

Regards,
Shash



More information about the vtkusers mailing list