[vtkusers] 3D texture maps currently are not supported!

Amy Squillacote amy.squillacote at kitware.com
Tue May 24 10:27:27 EDT 2005


Hi Mathieu,

Please keep this discussion on the VTK users' list.  I'm copying your 
e-mail back to the list so the community can help answer your question and 
benefit from the answers.

- Amy

At 10:15 AM 5/24/2005, mathieu coursolle wrote:
>Hi,
>I use exaclty the same code as the vtkVolumeRaycastCompositeFunction
>example on the web site. I am using vtk 4.4.
>It works fine if I display an image plane widget at the same time, which
>I can not explain.
>If I resize the plane, the error occurs once the plane factor is less than
>approximalty 0.6. As long as the plane factor is greater than 0.6, I can
>see the raycast volume without problem. If I set the factor lower than 0.6
>or if I do not display the image plane, the application crashes as soon as
>the volume appears on screen.
>
>Thanx!
>
>Here is my code, maybe there is something wrong which I just can't see.
>
>vtkDICOMImageReader* reader = vtkDICOMImageReader::New();
>reader->SetDirectoryName("D:\\DICOM");
>reader->Update();
>
>vtkPiecewiseFunction* opacity = vtkPiecewiseFunction::New();
>opacity ->AddPoint(0, 0.0);
>opacity ->AddPoint(255, 0.2);
>
>vtkColorTransferFunction* color= vtkColorTransferFunction::New();
>color->AddRGBPoint(0.0, 0.0, 0.0, 0.0);
>color->AddRGBPoint(64.0, 1.0, 0.0, 0.0);
>color->AddRGBPoint(128.0, 0.0, 0.0, 1.0);
>color->AddRGBPoint(192.0, 0.0, 1.0, 0.0);
>color->AddRGBPoint(255.0, 0.0, 0.2, 0.0);
>
>vtkVolumeProperty* property = vtkVolumePropert::New();
>property ->SetColor(color)
>property ->SetScalarOpacity(opacity);
>property ->ShadeOn();
>property ->SetInterpolationTypeToLinear();
>
>vtkVolumeRayCastCompositeFunction* func =
>vtkVolumeRayCastCompositeFunction::New();
>vtkVolumeRayCastMapper* mapper = vtkVolumeRayCastMapper();
>mapper->SetVolumeRayCastFunction(func)
>mapper->SetInput(reader->GetOutput())
>
>vtkVolume* volume = vtkVolume::New();
>volume ->SetMapper(mapper);
>volume ->SetProperty(mapper);
>
>renderer->AddVolume(volume);
>renderer->ResetCamera();
>
>
>
>On 5/24/05, Amy Squillacote <amy.squillacote at kitware.com> wrote:
> > Hi Mathieu,
> >
> > Could you provide sample code demonstrating how you are trying to use the
> > raycast function or texture mapper 2D?  The classes that produce that error
> > message are vtkIVExporter, vtkOOGLExporter, vtkOpenGLTexture, and
> > vtkVRMLExporter, but none of those classes are involved in doing raycasting
> > or using the texture mapper 2D.
> >
> > - Amy
> >
> > At 04:22 PM 5/23/2005, mathieu coursolle wrote:
> > >Hi everybody.
> > >I am currently trying to display an MRI volume.
> > >I've been trying with raycast function or texture mapper 2D.
> > >However, I get this error message:
> > >3D texture maps currently are not supported!
> > >Any idea what's wrong?
> > >Thanx.
> > >
> > >MAthieu
> > >_______________________________________________
> > >This is the private VTK discussion list.
> > >Please keep messages on-topic. Check the FAQ at:
> > >http://www.vtk.org/Wiki/VTK_FAQ
> > >Follow this link to subscribe/unsubscribe:
> > >http://www.vtk.org/mailman/listinfo/vtkusers
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at: 
> http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >




More information about the vtkusers mailing list