[vtkusers] SetDataSpacing = SetSpacing ?

Chris Turner cturnercomplex at googlemail.com
Thu Jun 3 13:23:57 EDT 2010


Hi Guys,

Thank you very much for your response! But it was another problem
which has nothing to do with the code above.

Again sorry for wasting your time!

Thanks!
Chris

On Thu, Jun 3, 2010 at 11:17 AM, Jothy <jothybasu at gmail.com> wrote:
> I think   volumeMapper.SetInput(chnager.GetOutputPort()) should be
> volumeMapper.SetInputConnection(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
>
>



More information about the vtkusers mailing list