[vtkusers] About a Stack of *.BMP Slices Rendering!
#YAN RI AN#
PS7278514B at ntu.edu.sg
Mon Oct 7 08:54:58 EDT 2002
Dear VTK-Users:
There was no problem when I Read in & 3D Render & Write out *.stl Format the Headsq files which provided by Kitware Co..
But I met the problem when I read a stack of 512x512x256 *.BMP head slice files.
The XY boundary size of the files is 220.2mm X 220.2mm.
I renamed it into *.01,*.02...... already, It could read but could not rendering.
I did not know how to pre-process,process & post process the stack of *.BMP format slices.
Could anyone share some experience about it?
Here is my program:
vtkImageReader *reader=vtkImageReader::New();
reader->SetFilePrefix("g:/00head/h");
reader->SetDataByteOrderToLittleEndian();
reader->SetDataExtent(0,220,0,220,1,33);
reader->SetDataSpacing(1,1,3);
reader->SetDataMask(0x7ff);
vtkMarchingContourFilter *iso=vtkMarchingContourFilter::New();
iso->SetInput(reader->GetOutput());
iso->SetValue(0,1150);
vtkPolyDataMapper *isoMapper=vtkPolyDataMapper::New();
isoMapper->SetInput(iso->GetOutput());
isoMapper->ScalarVisibilityOff();
vtkActor *isoActor=vtkActor::New();
isoActor->SetMapper(isoMapper);
isoActor->GetProperty()->SetColor(1,1,1);
vtkRenderer *ren1 = vtkRenderer::New();
ren1->AddActor(isoActor);
ren1->SetBackground(0.2,0.3,0.5);
***************************************
* Best Regards
* Yan Rian (Research Student)
* Email : ps7278514b at ntu.edu.sg
* Lab : AMRC Research Centre
* Nanyang Technological University
* Singapore
***************************************
More information about the vtkusers
mailing list