[Insight-users] Array of Iterators

Bing Jian bjian at cise . ufl . edu
Thu, 9 Oct 2003 21:45:24 -0400 (EDT)


Hi Luis,

   It's still from the Jacobian problem.
After the scalar comoponents are extracted by using ImageAdaptor,
passed to gradient filter and finally stored into an array of
vector images, then I need n input iterators and 1 output iterators to
combine those n gradient images into 1 Jacobian image.
  That's what I am trying to do.

 I have tried this way, but was told that Pointer is not the member of
IteratorType.

 ConstIteratorType::Pointer gradient_it[vector_dimension];
 for (i=0;i<vector_dimension;i++){
		gradient_it[i] = new
ConstIteratorType(gradient_out[i], inputRegion);
		gradient_it[i]->GoToBegin();
	}


-- 
Best wishes,
Bing Jian
bjian at cise . ufl . edu


On Thu, 9 Oct 2003, Luis Ibanez wrote:

>
> Hi Bing,
>
> ITK iterators don't have default constructors.
> (that is, constructor without parameters).
> Henceforth, it is not possible to create arrays
> of iterators.
>
> You could create an array of pointers to iterators
> and then construct them dynamically but... that
> will lack efficiency, safety and elegance. In other
> words, it will be quite ugly   :-/
>
> Could you please describe in more detail what you
> intend to do ?
>
> There may be an alternative way to get there.
>
>
> Thanks
>
>
>     Luis
>
>
> ---------------------------------------
> Bing Jian wrote:
> > How to implement an array of iterators?
> >
> > For single iterator, we can use:
> >     IteratorType      outputIt(  outputImage,         outputRegion );
> >
> > What if I want an array of iterators, say It[],
> > given its corresponding array of images Image[]?
> >
> > Thanks!
> >
>
>
>
>
>