[vtkusers] Re nder volumic data

Greg14 gd0514 at gmail.com
Fri Apr 30 04:29:06 EDT 2010


Hello all, 

I have some questions about volume rendering.
I made a small volume 5 x 5 x 5 (first plane in ascii below):

128   0 128   0 128
  0 128   0 128   0
128   0 128   0 128
  0 128   0 128   0
128   0 128   0 128

What I expect to see, with a probe filter parallel to the X and Y axes (see
my code below), 
is an array of square with only two colors (black and always the same gray
value)
like a chess plate.

Actually, the gray values vary (5 or 6 gray values).

Could someone tell me what I did wrong ?
What is the best way to render exact cut of volumic data ? 
My hope is to get the same rendering if I use vtk classes and a 2D tif
reader to see the first plane for instance.

Thanx in advance

Greg

I used the code below:
vtkDataSetReader* pReader = vtkDataSetReader::New();
pReader->SetFileName("Array_5_5_5.vtk");
pReader->Update();

vtkPlaneSource* planeSource = vtkPlaneSource::New();
planeSource->SetOrigin(0,0,0);
planeSource->SetCenter(0,0,0);
planeSource->SetPoint1(4,0,0);
planeSource->SetPoint2(0,4,0);
planeSource->SetResolution(5,5);

vtkProbeFilter* probe = vtkProbeFilter::New();
probe->SetInput(planeSource->GetOutput());
probe->SetSource(pReader->GetOutput());

vtkDataSetMapper* mapper = vtkDataSetMapper::New();
mapper->SetInput(probe->GetPolyDataOutput());

vtkActor* actor = vtkActor::New();
actor->SetMapper(mapper);
actor->GetProperty()->SetInterpolationToFlat();



-- 
View this message in context: http://old.nabble.com/Render-volumic-data-tp28341535p28341535.html
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list