[vtkusers] new users .. need some help for, as usual, 3D rendering
Mathieu Malaterre
mathieu.malaterre at kitware.com
Mon Sep 20 18:27:16 EDT 2004
Salut Florent,
You can at any time print information on vtk object useing
obj->Update(); //important
obj->Print( cerr );
I am guessing that you didn't change the contour value, so it might not
match your data range. If you want you can print the scalar range of the
image data:
reader->Update()
cerr << reader->GetOutput()->GetScalarRange()[0] << " " <<
reader->GetOutput()->GetScalarRange()[1]
HTH
Mathieu
Florent.Chandelier at USherbrooke.ca wrote:
> Hi all,
>
> my name is florent chandelier, and i'm a phd student at the university
> of Sherbrooke and I'm so new to VTK
> I have to work on a fluid mechanics and 3D modelling.
>
> As i've been told, vtk is one of the best soft for that so here I am.
>
> Everything's going fine with the provided medical examples but not when
> I tried to do this :
>
> I want to render a 3D model of bone from BMP slices.
> My guess was to use the medical2.cxx, and especially the bone rendering
> section to get my model but all I have is the empty cube rendering
> window, without any display.
>
> here is the part of my code :
>
> vtkRenderer *aRenderer = vtkRenderer::New();
> vtkRenderWindow *renWin = vtkRenderWindow::New();
> renWin->AddRenderer(aRenderer);
> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
> iren->SetRenderWindow(renWin);
>
> // things I've changed
> vtkBMPReader *v16 = vtkBMPReader::New();
> v16->SetFilePrefix("slices"); // my files are named slices.0 to
> slices.xx
> v16->Update ();
> v16->SetDataExtent(0,255,0,255,0,20);
>
> this is the only things i have changed and all I got is .. the empty
> cube window.
>
> I have few more questions :
> does the "SetDataSpacing" refers to the voxel size ???
> do I have to filter my images first to get only the border of the bone (
> I'm working on cancelous/trabecular bone samples )
>
> In fact I do not really understand how VTK render the voxel information ...
>
> any sugestions, reading or else is greatfully accepted ...
>
> flo
>
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list