[vtkusers] about the BMP slices Read & 3D Rendering
#YAN RI AN#
PS7278514B at ntu.edu.sg
Tue Oct 8 07:31:28 EDT 2002
Dear VTK-Users:
I also met the same problem when I read a stack of 512x512x256 *.BMP head slice files.(33 slices)
The XY boundary size of the files is 220.2mm X 220.2mm.
Actually the images are grayscale 8 bit CT Head Slices.
I wanted to read the stack of slices and 3D Reconstruction.
Could you share some vtk source code about the process of tiff and jpeg Slices.
I thinked we met the similar problem.
there is my source code:
vtkImageReader *reader=vtkImageReader::New();
reader->SetFilePrefix("g:/00head/head/h");
reader->SetDataByteOrderToLittleEndian();
reader->SetDataExtent(0,63,0,63,1,33);//
reader->SetDataSpacing(1,1,1);
reader->SetDataMask(0x7ff);
vtkMarchingContourFilter *iso=vtkMarchingContourFilter::New();
iso->SetInput(reader->GetOutput());
iso->SetValue(0,255);//Scalar between 0~255 in 8 Bits.
vtkPolyDataMapper *isoMapper=vtkPolyDataMapper::New();
isoMapper->SetInput(iso->GetOutput());
isoMapper->ScalarVisibilityOff();
***************************************
* 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