[vtkusers] about the BMP slices Read & 3D Rendering
Marcelo Costa Oliveira
marcelo at radioimaging.net
Tue Oct 8 08:03:38 EDT 2002
Hi Yan, How are u ??
I read a stack of 512 X 512 with 120 slices. The code that i read DICOM
isn´t my mine and i have to get permission to send the code for you, sorry.
TRy to find the DICOM2 is a open source code to read DICOM.
vtkImageReader *v16 = vtkImageReader::New();
v16 -> SetHeaderSize ( 0 ); // 350
v16 -> SetDataExtent( 0, 511, 0, 511, 1, 120 );
v16 -> SetDataSpacing ( 1, 1, 3.5 );
v16 -> SetDataScalarTypeToUnsignedShort ();
v16 -> SetDataByteOrderToLittleEndian();
v16 -> SetFileDimensionality( 3 );
v16 -> SetFilePattern( "tumor.vtk" );
v16 -> SetFilePrefix( "tumor.vtk" );
v16 -> SetDataMask(0x7fff);
----- Original Message -----
From: "#YAN RI AN#" <PS7278514B at ntu.edu.sg>
To: <dan at chalkie.org.uk>; <anast.jm at pg.com>
Cc: "Vtkusers (E-mail)" <vtkusers at public.kitware.com>
Sent: Tuesday, October 08, 2002 8:31 AM
Subject: [vtkusers] about the BMP slices Read & 3D Rendering
> 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
> ***************************************
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
<http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list