[vtkusers] vtkPNGReader and multiple files

Matei MANCAS matei.mancas at tcts.fpms.ac.be
Mon Apr 7 03:04:31 EDT 2003


Hi!

Yes! vtkPNGReader can handle multiple files! It is associated with
vtkImageReader2 not vtkImageReader...

You can use a script like this for files "my_dir/im0001R0.png to
my_dir/im0348R0.png ":

vtkPNGReader *noduleReader2 = vtkPNGReader::New();

noduleReader2->SetFilePrefix(your prefix);
//the prefix contains your dir path and the constant part of your file name
: "my_dir/im"

noduleReader2->SetFilePattern(the end of your files);
//here it will be "%s%.4dR0.png";

 noduleReader2->SetDataExtent(your file extent....);
 noduleReader2->SetDataSpacing(1,1,1);
//or your spacing....

 noduleReader2->UpdateWholeExtent();
//your reader ready to be used!!!!

Hop it helps


Matei


----- Original Message -----
From: "Martin Gardner" <mglistmail at totalise.co.uk>
To: "vtkusers" <vtkusers at public.kitware.com>
Sent: Sunday, April 06, 2003 8:49 PM
Subject: [vtkusers] vtkPNGReader and multiple files


> Hi,
>
> Could someone confirm whether or not vtkPNGReader can handle multiple
files?
> I want to create a volume from a load of png images do I have to use
> vtkImageReader instead?
>
> Cheers
>
> Martin
>
> --
> mglistmail at totalise.co.uk
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list