[vtkusers] Can VTK_QT render volumes?
Alex Lear
alear at cns.montana.edu
Fri Nov 1 09:55:42 EST 2002
Hello,
I have been able to render a volume but it doesn't really show up. When I
move the volume in 3D (rotate, zoom, etc.) it flickers and I can see the
volume but it disappears. I have reduced the code to a small section
included below that produces a solid cube volume and I have posted a
screenshot of the renderwindow here:
http://www.attackforums.com/Sample_Volume_Render.jpg
Also, I have a dual P4 computer running Redhat 7.2 with an nVidia Quadro2
graphics card. The openGL driver is installed. Could this be graphics card
related?
Any ideas of why it doesn't show up are greatly appreciated!
Thanks,
Alex Lear
BEGINNING OF CODE
//******************************************************************************************
int i;
vtkStructuredPoints *sPoints = vtkStructuredPoints::New();
sPoints->SetDimensions(100,100,100);
vtkFloatArray *Scalars = vtkFloatArray::New();
for (i=0;i<1000000;i++)
{
Scalars->InsertNextValue(1.0);
}
sPoints->GetPointData()->SetScalars(Scalars);
Scalars->Delete();
vtkVolumeRayCastCompositeFunction *densitycompositeFunction =
vtkVolumeRayCastCompositeFunction::New();
vtkVolumeRayCastMapper *densityvolumeMapper = vtkVolumeRayCastMapper::New();
densityvolumeMapper->SetInput(sPoints);
densityvolumeMapper->SetVolumeRayCastFunction(densitycompositeFunction);
vtkVolume *densityvolume = vtkVolume::New();
densityvolume->SetMapper(densityvolumeMapper);
ren1->AddVolume(densityvolume);
//Render
RenderWidget1->GetRenderWindow1()->Render();
//******************************************************************************************
END OF CODE
On Thursday 31 October 2002 10:56 am, you wrote:
> Hi
> of course it can
> how do you use it?
>
>
>
>
>
> ----------------------------
> The contents of this e-mail are intended for the named addressee only. It
> contains information which may be confidential and which may also be
> privileged. Unless you are the named addressee (or authorised to receive
> for the addressee) you may not copy or use it, or disclose it to anyone
> else. If you received it in error please notify us immediately and then
> destroy it. Further, we make every effort to keep our network free from
> viruses. However, you do need to verify that this email and any attachments
> are free of viruses as we can take no responsibility for any computer virus
> which might be transferred by way of this e-mail.
>
>
>
>
> -----Original Message-----
> From: Alex Lear [mailto:alear at cns.montana.edu]
> Sent: 31 October 2002 17:30
> To: vtkusers at public.kitware.com
> Subject: [vtkusers] Can VTK_QT render volumes?
>
>
> I would like to know if VTK_QT can render volumes? I am trying to render a
> volume and I am getting a segmentation error when I call the render()
> function.
>
> Thanks,
> Alex Lear
> _______________________________________________
> 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
>
> _____________________________________________________________________
> This e-mail has been scanned for viruses by the WorldCom Internet Managed
> Scanning Service - powered by MessageLabs. For further information visit
> http://www.worldcom.com
More information about the vtkusers
mailing list