[vtkusers] How to Read *.pic file into vtk?????

Budd Hirons bhiron at lsuhsc.edu
Thu Aug 8 13:41:57 EDT 2002


Hello,

Extract the dimensions of the data set from the PIC file header into local 
variables which you can use in the SetDataExtent call.

This *may* be the PIC spec you need, there is a struct that shows you the 
internals of the PIC file: 
http://mbi.dkfz-heidelberg.de/mbi/TR/TR72/node34.html

Budd Hirons.

At 10:52 AM 8/8/2002 +0200, you wrote:


>Hello, I want to load a pic file. I am trying to read using vtkImageReader.
>It solved but I must enter the value for each file whit
>reader->SetData Extent(int,int,int,int,int,int). I have different files with
>different dimensions.
>The code I used like this:
>
>bool ImportImage::DoPICImage()
>{
>         vtkImageReader *reader = vtkImageReader::New();
>         if (m_sFileName.right(4) != ".pic")
>                 m_sFileName = m_sFileName + ".pic";
>         reader->SetFileName((char*)m_sFileName.latin1());
>
>         reader->SetDataExtent(0, 255, 0, 255, 0, 5);
>         reader->SetFileDimensionality(3);
>         reader->Update();
>
>         SetImageData(reader->GetOutput());
>
>         GfxPrint(m_sFileName + " loaded");
>
>         return GetImageData()!=NULL;
>}
>
>
>
>Thanks you in advance.
>
>Waltraut
>_______________________________________________
>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