[vtkusers] vtk image iterator

Amy Squillacote ahs at cfdrc.com
Mon Jul 28 10:16:59 EDT 2008


Hi Pascale,

I'm forwarding your question back to the vtkusers list. Please keep the 
discussion on the list so other people can contribute and so the 
discussion is archived.

Thanks,
Amy

P B wrote:
> Hi Amy,
>  
>    yes, the library is included. I just found the mistake actually, I 
> used
> < unsigned short * >
>  
>  and should have used only
>  
> < unsigned short >
>  
> I have another question actually: how to use the iterator and access 
> pixel values. I have a feeling it has something to do with the 
> BeginSpan() and NextSpan() function but am not quite sure how to use 
> it. If you have any hints it would really help me figure it out,
>
> Thanks again for your help,
> Pascale
>
> ------------------------------------------------------------------------
>
> > Date: Mon, 28 Jul 2008 07:58:20 -0500
> > From: ahs at cfdrc.com
> > To: chose29 at hotmail.com
> > CC: vtkusers at vtk.org
> > Subject: Re: [vtkusers] vtk image iterator
> >
> > Hi Pascale,
> >
> > Are you linking against vtkFiltering.lib? That's the library containing
> > vtkImageIterator.
> >
> > - Amy
> >
> > P B wrote:
> > > Hi,
> > >
> > > I am trying to find how to iterate over an image using vtk. The
> > > class vtkImageIterator seems interesting but I keep getting an
> > > unresolved external error message. I tried testing the code such as
> > > given in:
> > >
> > > _/Filtering/Testing/Cxx/TestImageIterator.cxx _
> > > 
> <http://public.kitware.com/cgi-bin/viewcvs.cgi/*checkout*/Filtering/Testing/Cxx/TestImageIterator.cxx?root=VTK&content-type=text/plain>
> > >
> > >
> > > int ext[6] = { 0, 0, 0, 0, 0, 0 };
> > > vtkImageData *id = vtkImageData::New();
> > > id->SetExtent(ext);
> > > vtkImageIterator<unsigned short *> *it = new 
> vtkImageIterator<unsigned
> > > short *>(id, ext);
> > >
> > >
> > > The error message is the following:
> > >
> > > TPS.obj : error LNK2019: unresolved external symbol "public:
> > > __thiscall vtkImageIterator<unsigned short
> > > *>::vtkImageIterator<unsigned short *>(class vtkImageData *,int *)"
> > > (??0?$vtkImageIterator at PAG@@QAE at PAVvtkImageData@@PAH at Z) referenced in
> > > function "public: void __thiscall TPS::ExecTPS(class vtkPoints 
> *,class
> > > vtkPoints *)" (?ExecTPS at TPS@@QAEXPAVvtkPoints@@0 at Z
> > > <mailto:?ExecTPS at TPS@@QAEXPAVvtkPoints@@0 at Z>)
> > >
> > > Thank you for helping out!
> > > Pascale
> > >
> > > 
> ------------------------------------------------------------------------
> > > 
> ------------------------------------------------------------------------
> > >
> > > _______________________________________________
> > > 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
> > >
> >
> > --
> > Amy Squillacote Phone: (256) 726-4839
> > Computer Scientist Fax: (256) 726-4806
> > CFD Research Corporation Web: http://www.cfdrc.com
> > 215 Wynn Drive, Suite 501
> > Huntsville, AL 35805
> >
> >
>
>
> ------------------------------------------------------------------------

-- 
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805





More information about the vtkusers mailing list