[vtkusers] Find the volume of Raw files in vtk

cspl affable at hd2.dot.net.in
Fri Apr 12 01:59:39 EDT 2002


Dear friends,

I converted my DICOM  files into .raw files using DICOM2 tool.After that I read the data using vtkVolume16Reader.But I am not getting exact volume.I have written code as follows.Total 51 files.Image size is 512kb.

vtkRenderer *ren1 = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
renWin->AddRenderer(ren1);
vtkRenderWindowInteractor *iren1 = vtkRenderWindowInteractor::New();
iren1->SetRenderWindow(renWin);
vtkVolume16Reader *reader = vtkVolume16Reader::New();  
     reader->SetDataByteOrderToLittleEndian();
     reader->SetFilePrefix("C:\\DicomFiles\\DownLoad\\xyz\\6554888");    
     reader->SetFilePattern("C:\\DicomFiles\\DownLoad\\xyz\\6554888.raw");
     reader->SetImageRange(6554888,6555788);   
     reader->SetDataSpacing(1,1,1);   
     reader->SetDataDimensions(256,256);   

 vtkImageActor *Actor=vtkImageActor::New();
 Actor->SetInput(reader->GetOutput());
 renWin->SetSize(300,300);
 ren1->SetBackground(0.1, 0.2, 0.4);
 ren1->AddActor(Actor);
 iren1->Initialize();
 renWin->Render();
 SAVEIMAGE( renWin );
 iren1->Start();



If anybody knows pls.help me .

Regards,
Ramakrishna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020412/dc91d175/attachment.htm>


More information about the vtkusers mailing list