[ITK-users] How do I create ITK images inside a loop?

Pol Monsó Purtí lluna.nova at gmail.com
Fri Apr 17 09:59:01 EDT 2015


Nevermind,

std::vector< typename GradientImageType::Pointer > gradients*(dims);*

for(unsigned int dim = 0; dim < dims; dim++) {

    typename GradientImageType::Pointer gradient = GradientImageType::New();

    gradient->SetRegions(roi);

    gradient->Allocate();

    gradients[dim] = gradient;

}


It will use the default constructor, thought.

2015-04-17 12:52 GMT+02:00 Pol Monsó Purtí <lluna.nova at gmail.com>:

> Hello all,
>
> How can I create n images inside a for loop? The smart pointer would go
> out of scope. How could I use a container?
>
> Cheers,
>
> Pol
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20150417/2c298fd6/attachment.html>


More information about the Insight-users mailing list