[vtkusers] SetDataSpacing = SetSpacing ?
Jothy
jothybasu at gmail.com
Thu Jun 3 11:17:16 EDT 2010
I think volumeMapper.SetInput(chnager.GetOutputPort()) should be
volumeMapper.SetInput*Connection*(chnager.
GetOutputPort())
Jothy
On Thu, Jun 3, 2010 at 4:13 PM, John Drescher <drescherjm at gmail.com> wrote:
> On Thu, Jun 3, 2010 at 11:00 AM, Chris Turner
> <cturnercomplex at googlemail.com> wrote:
> > Hi John!
> >
> > Thanks for your answer! But it still has no impact on the rendered
> > volume. Maybe there is something wrong with my pipeline. This is
> > basically the code I'm using:
> >
> > # Get volume from another instance
> > inputVolume = scene.GetNodeByID(inVolume)
> >
> > # The volume will be displayed by ray-cast alpha compositing.
> > # A ray-cast mapper is needed to do the ray-casting, and a
> > # compositing function is needed to do the compositing along the ray.
> > rayCastFunction = vtk.vtkVolumeRayCastCompositeFunction()
> >
> > changer=vtk.vtkImageChangeInformation()
> > changer.SetInput(inputVolume.GetImageData())
> > changer.SetOutputSpacing(0.4,0.4,0.38)
> > changer.SetOutputOrigion(-49.424,-97.42,-14.825)
> >
> > volumeMapper = vtk.vtkVolumeRayCastMapper()
> > volumeMapper.SetInput(chnager.GetOutputPort())
> > volumeMapper.SetVolumeRayCastFunction(rayCastFunction)
> >
> > Volume = vtk.vtkVolume()
> > Volume.SetMapper(volumeMapper)
> >
> > renderer.AddViewProp(Volume)
> >
> >
> > Looks good to me - what do you think?
> >
>
> Possibly need to call changer.Update(); before
> volumeMapper.SetInput(chnager.GetOutputPort())
>
> John
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100603/d0a8f26e/attachment.htm>
More information about the vtkusers
mailing list