[vtkusers] Get the pointer of Scalar data
Jianlong Zhou
zhou at isg.cs.uni-magdeburg.de
Tue Feb 5 17:15:23 EST 2002
Hi, Matthias,
I tried to add gradient->Update() in the pipeline, but it still can not work. Do you
know other methods to get Scalar pointer?
Thank you very much.
Jianlong
> Hi,
>
> I'm not a VTK expert, but you could try to update your pipeline before
> accessing the pointer.
> See below.
>
> Jianlong Zhou wrote:
> >
> > hi, all,
> >
> > I write a vtk pipeline to computer gradient magnitude of volume data.
> > I want to get the pointer to this gradient magnitude. I wrote the
> > following pipeline.But I cannot get the pointer to this gradient
> > magnitude. The value of the pointer is always 0x0000000.Is there any
> > other method to get scalar pointer? How to get the pointer to the
> > gradient magnitude?
> >
> > My pipeline is like this:
> >
> > vtkImageGradientMagnitude *gradient=vtkImageGradientMagnitude::New();
> > gradient->SetDimensionality( 3);
> > gradient->SetInput(reader->GetOutput());
> >
>
> Add something like that here:
> gradient->Update();
>
> > ////Following line is to get scalar pointer, but I can not get its
> > pointer.
> > unsigned short *Pointer = (unsigned short
> > *)gradient->GetOutput()->GetScalarPointer();
> > ..............
> >
> > Thank you in advance.
> >
> > Jianlong
>
> I hope, that helps.
>
> Bye,
> Matthias
> _______________________________________________
> 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
More information about the vtkusers
mailing list