[vtkusers] 3D Volume..

Jonathan.Bailleul Jonathan.Bailleul at greyc.ismra.fr
Wed Aug 6 13:41:00 EDT 2003


This shall be solved in this webpage:
http://www.crd.ge.com/%7Elorensen/seg12/


best wishes,



yasser salman wrote:
> 
> hi all.,
> i already construct the 3d volume from single .raw format using marching cube ..,i have 2 problems..,
> 1- the volume displayed from back to front and from bottom to top..!!
> 2- i wanna to extrat bone and skin and brain indevidualy. in my case
> all skin and bone and brain constructed at the same volume i tried to use medical example but only change occure in color .. can ony one help me for this 2 problem.., here is my code:
> 
> vtkRenderer *aRenderer = vtkRenderer::New();
>   vtkRenderWindow *renWin = vtkRenderWindow::New();
>     renWin->AddRenderer(aRenderer);
>   vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
>     iren->SetRenderWindow(renWin);
> 
> 
>         vtkImageReader *Reader = vtkImageReader::New();
>     Reader->SetFilePrefix ("D:/ImageData/t1");
>     Reader->SetFileDimensionality(3);
>         Reader->SetFilePattern("%s%.d.raw");
>     Reader->SetDataByteOrderToBigEndian();
>         Reader->SetDataExtent (0,180,0,216,0,180);
>         Reader->SetDataScalarTypeToUnsignedChar();
>         Reader->SetDataOrigin(0,0,0);
>         Reader->SetDataSpacing(1,1,1);
>         Reader->SetDataMask(0x7ff);
>         Reader->Update();
> 
>         vtkMarchingCubes* mc=vtkMarchingCubes::New();
>         mc->SetInput(Reader->GetOutput());
>         mc->SetValue(0,63);
> 
>         mc->ComputeGradientsOff();
>         mc->ComputeScalarsOn();
>         mc->ComputeNormalsOn();
>         mc->Update();
>         //mc->SetOutput(surface->getInputPolyData());
>         vtkPolyDataMapper* mcmap=vtkPolyDataMapper::New();
>         mcmap->SetInput(mc->GetOutput());
>         mcmap->ScalarVisibilityOff();
>         vtkActor* mcactor=vtkActor::New();
>         mcactor->SetMapper(mcmap);
>  mcactor->GetProperty()->SetColor(1,1,1);
> vtkCamera *aCamera = vtkCamera::New();
>     aCamera->SetViewUp (0, 0, -1);
>     aCamera->SetPosition (0, 1, 0);
>     aCamera->SetFocalPoint (0, 0, 0);
>     aCamera->ComputeViewPlaneNormal();
> aRenderer->AddActor(mcactor);
>         aRenderer->SetActiveCamera(aCamera);
>          aRenderer->ResetCamera ();
>          aCamera->Dolly(1.5);
> 
>          renWin->SetSize(640, 480);
>         iren->SetDesiredUpdateRate(3.0);
>         iren->Initialize();
>         iren->Start();
>   return 0;
> 
> and the following is my trial to extract the skin only..
> /*mcactor->GetProperty()->SetDiffuseColor(1,0.45,0.25); //here i try to
> mcactor->GetProperty()->SetOpacity(0.6);         extract the skin but
> mcactor->GetProperty()->BackfaceCullingOff(); i delete it in my code..
> mcactor->GetProperty()->SetSpecular(0.7);
> mcactor->GetProperty()->SetSpecularPower(20);*/
> 
> _____________________________________________________________
> Get free email, free website, free software and free products at
> 
> http://www.uscomputer.net/portal.htm
> 
>  - U.S. Computer Corporation -
> 
>  -
> 
>  -
> 
>  -
> 
> _____________________________________________________________
> Select your own custom email address for FREE! Get you at yourchoice.com w/No Ads, 6MB, POP & more! http://www.everyone.net/selectmail?campaign=tag
> _______________________________________________
> 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

-- 
-----------------------------------
Jonathan BAILLEUL, Doctorant
GREYC Image - Université de Caen 
http://www.greyc.ismra.fr/~bailleul



More information about the vtkusers mailing list