[vtkusers] Re:Volume Rendering of Raw data
cspl
affable at hd2.dot.net.in
Sat Apr 20 02:42:54 EDT 2002
Dear Friends,
I have converted my dicom files into raw files.I want to display volume as a image.I have written code as follows.I am not getting exact image.If anybody knows pls.give me advice.
Dear Dave,
I am a new user of vtk.I converted my dicom files into raw files.I want to display volume as a image in vtk.I have written code as folllows.But I am not getting exact figure.If u know pls.help me.
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\\");
reader->SetFilePattern("%s%d.raw");
reader->SetImageRange(1,109);
reader->SetDataSpacing(0.57,0.57,2);
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();
Is there any alter.pls.give me reply.Don't mind.
Regards,
Ramakrishna
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020420/0f946c8e/attachment.htm>
More information about the vtkusers
mailing list