[ITK] [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/community/attachments/20150417/2c298fd6/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list