[vtkusers] Help needed in using vtkBMPReader for volume rendering..

Sentil Balaji profbalse at yahoo.co.in
Wed Feb 11 21:38:39 EST 2004


Hey,

   I tried to read a set of slices using vtkBMPReader
and render a volume but it gives me the following
error..

-----------------------------------------------------
Generic Warning: In D:\VTK4.4\VTK\IO\vtkBMPReader.cxx,
line 473
File operation failed. row = 0, Read = 128, Skip0 = 0,
Skip1 = 0, FilePos = 17462, FileName = C:/P/m.0.bmp
-----------------------------------------------------
The code I used is :
-----------------------------------------------------
w->AddRenderer(r);
	it->SetRenderWindow(w);
	br->SetFileDimensionality(3);
	br->SetDataExtent(0,127,0,127,0,27);
	br->SetDataByteOrderToLittleEndian();
	br->SetFilePrefix("C:/P/m");
	br->SetFilePattern("%s.%d.bmp");
	mc->SetInput(br->GetOutput());
	mc->SetValue(0,1150);
	mc->ComputeGradientsOn();
	mc->ComputeScalarsOff();
	dsm->SetInput(mc->GetOutput());
	a->SetMapper(dsm);
	r->AddActor(a);
	w->Render();
	it->Start();
------------------------------------------------------
I used vtkVolume16Reader too but in vain.I converted
the bmp files to unsigned short type[using
vtkImageCast] for using vtkVolume16Reader .I am not
sure where I am going wrong?How to create a dataset
from slice images akin to "HEAD/quarter" dataset.


Please Help..

Cheers

BeeJay



________________________________________________________________________
Yahoo! India Education Special: Study in the UK now.
Go to http://in.specials.yahoo.com/index1.html



More information about the vtkusers mailing list