[vtkusers] Image reader slice interval bug?

Steve Boyd skboyd at ucalgary.ca
Thu Nov 13 15:17:59 EST 2003


Hi,

I'm using vtkBMPReader, and seem to be having a problem setting the
slice spacing properly.  The class seems to always increment the slices
by the square of the slice spacing interval.

For example, to read myfile0038.bmp, myfile0040.bmp, ..., myfile0138.bmp
I have set up my reader as follows:

  vtkBMPReader *bmps = vtkBMPReader::New();
    bmps->SetFilePrefix("myfile");
    bmps->SetFileNameSliceOffset(38);
    bmps->SetFileNameSliceSpacing(2);	// set the spacing here...
    bmps->SetDataExtent(0,128,0,128,0,100);
    bmps->SetDataSpacing(0.01);
    bmps->SetDataVOI(0,128,0,128,0,100);
    bmps->Allow8BitBMPOn();
    bmps->SetFilePattern("%s%04d.bmp");

The file names that it tries to read are myfile0038.bmp, myfile0042.bmp,
myfile0046.bmp, ..., myfile0238.bmp (out of range!!).

The increments in filename are by four, rather than the expected two. 
If I choose a file spacing of 10, the increments are of 100.   It seems
to be incrementing by the square of the slice spacing.

Any idea what is going on?  Is this a bug??

Sincerely,

Steve

-- 
Steven Boyd

PhD, PEng
Assistant Professor
Department of Mechanical and Manufacturing Engineering
University of Calgary
2500 University Drive, N.W.
Calgary, Alberta, Canada, T2N 1N4

tel. 1.403.220.4173  fax. 1.403.282.8406  skboyd at ucalgary.ca
-------------------------------------------------------------------



More information about the vtkusers mailing list