[vtkusers] Image series problem with vtkImageReader
Nacho Larrabide
nacho at lncc.br
Thu Aug 26 18:59:22 EDT 2004
Hi,
I'm trying to read a series of images of diferente types (for
example Raw, Bmp or Ppm). Here you have some example of the code
that was working on Vtk 4.0, but now it's giving me lots of trowble
to make it work. The problem is that this guy just reads the exact
3rd part of the total volume (in the Z axis). Any sugestion?
if (f!=FORMAT_RAW){
if (f==FORMAT_BMP) imr=vtkBMPReader::New();
if (f==FORMAT_PPM) imr=vtkPNMReader::New();
if (rbSliceFile->value()){
imr->SetNumberOfScalarComponents(1);
imr->SetDataExtent(0,0,0,0,0,sliceCount-1);
imr->SetFilePattern(pattern);
imr->SetFilePrefix(fname);
imr->SetFileNameSliceOffset(firstSlice);
imr->SetFileNameSliceSpacing(step);
}else{
imr->SetFileName(filename.c_str());
}
}else{
...
[Raw format reading,
almost the same but
specifying the size
of every voxel and so on]
...
}
ThanX in advance for any suggestion/help/hint/tip... :)
Nacho
-----------------------------------------------------
Nacho Larrabide
Rua Getulio Vargas 333 - Quitandinha - CEP: 25651-070
Petropolis - RJ - Brasil
Tel: +54 24 2233-6137 - Fax: +54 24 2233-6167
mailto:nacho at lncc.br
-----------------------------------------------------
More information about the vtkusers
mailing list