[vtkusers] need help on vtkImageFFT please
Stefan Huber
Huber.Ste at gmx.at
Tue Apr 15 08:13:33 EDT 2008
Hi Cory,
i also tried it with the dimensionality of 2, but it doesn't work. do you have any other ideas?
Thanks Stefan
-------- Original-Nachricht --------
> Datum: Tue, 15 Apr 2008 08:07:51 -0400
> Von: "Cory Quammen" <cquammen at cs.unc.edu>
> An: "Stefan Huber" <Huber.Ste at gmx.at>
> CC: vtkusers at vtk.org
> Betreff: Re: [vtkusers] need help on vtkImageFFT please
> Stefan,
>
> It looks like you are setting the wrong dimensionality in the
> vtkImageFFT class. You have a 2D image of dimension 3x3, so the
> vtkImageFFT class should have dimensionality 2.
>
> Hope that helps,
> Cory
>
> On Tue, Apr 15, 2008 at 4:39 AM, Stefan Huber <Huber.Ste at gmx.at> wrote:
> > Hi at all,
> >
> > Can somebaody help me with vtkImageFFT?
> > I have an ImageDataObject like this:
> > vtkImageData * img = vtkImageData::New()
> > img->SetDimension(3,3,1);
> > img->SetScalarTypeToFloat();
> > img->AllocateScalar();
> >
> > float * ptr = (float *) img->GetScalarPointer();
> > for (int i = 0; i < 3; i++){
> > for (int j = 0; j < 3; j++){
> > *ptr++ = 1;
> > }
> > }
> >
> > when i make some Queries on this Dataobject i get the information about
> the size and extent.
> > Extent is 0 2 0 2 0 0
> > NumberofComponent = 1
> > Size of Scalar = 9
> >
> > Now i want to make a FFT of this image. But the result of the FFT is
> very strange and isn't correct. I don't know whats wrong. Please help me.
> > The code for my FFT is this.
> > vtkImageFFT *fft = vtkImageFFT::New();
> > fft->SetDimensionality(1);
> > fft->SetInput(img);
> > fft->Update();
> >
> > to print result of FFT:
> > for (i = 0; i < fft->getOutput()->GetNumberofPoints(); i++)
> >
> im->fft->GetOutput()->GetPointData->GetScalars()->GetComponent(id,1);
> >
> re->fft->GetOutput()->GetPointData->GetScalars()->GetComponent(id,0);
> > cout << .....
> > id ++;
> > }
> >
> > Do you know whats wrong?
> > Thanks Stefan
> >
> >
> > --
> >
> >
> > Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
> > Browser-Versionen downloaden: http://www.gmx.net/de/go/browser
> > _______________________________________________
> > 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
> >
>
>
>
> --
> Cory Quammen
> Department of Computer Science
> University of North Carolina at Chapel Hill
> http://www.cs.unc.edu/~cquammen
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
More information about the vtkusers
mailing list