[ITK] [ITK-users] Import itk always takes ages and results in warnings

Lowekamp, Bradley (NIH/NLM/LHC) [C] blowekamp at mail.nih.gov
Tue Jun 28 08:47:07 EDT 2016


Hi JP,

Native ITK wrapping has a powerful set of features which include using template like classes. This allows for easy customization of the build and direct control over the input and output type of many filter. This does come at the cost of having a very large interface and currently long import time.

Have you looked into SimpleITK? It has a smaller interface, and less flexibility but it does load quite quickly (.3s) into Python.

HTH,
Brad

On Jun 28, 2016, at 4:59 AM, cervellone at gmail.com<mailto:cervellone at gmail.com> wrote:

Dear Michka
Thank you for your reply.

I will take that into consideration when building ITK next time.
Unfortunately there is little comprehensive guide to what all those options in cmake really mean or do, so id rather build more than less.
Also VTK is pretty heavy in term of modules, and I have the impression that it is noticeably faster.
Best
JP

On Mon, Jun 27, 2016 at 10:03 PM, Michka Popoff <michkapopoff at gmail.com<mailto:michkapopoff at gmail.com>> wrote:
Hi

to reduce the import time, one solution would be to reduce the number of wrapped modules
and types (and image/vector dimensions). If you re-build ITK by disabling the things you
don’t need, there will be less things to load.

I have some ideas on how to improve the import situation but never came to it, so
not sure anybody has been working intensively on that.

For the warnings, we need to fix them in ITK.
The QuadEdgeMeshCellTraitsInfo class is probably not be usable as is.

If you want to hide the warnings, you can use (like for other python warnings):

import warnings
warnings.simplefilter(“ignore", Warning)

You can reset the filter after the import.

That should to it.


Michka

> On 26 Jun 2016, at 22:07, cervellone at gmail.com<mailto:cervellone at gmail.com> wrote:
>
> Hello all,
>
> Is there a way to speed up the import of itk in an application and the suppression of the warnings I get every time I run the python script ?
>
> Thank you all
> JP
>
>
> Warning: Unknown parameter 'itk::QuadEdgeMeshCellTraitsInfo< 3,float,float,unsigned long,unsigned long,unsigned char,itk::QuadEdgeMeshPoint< float,3,itk::GeometricalQuadEdge< unsigned long, unsigned long,bool,bool,true > >,itk::MapContainer< unsigned long,itk::QuadEdgeMeshPoint< float,3,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > > >,std::set< unsigned long >,itk::GeometricalQuadEdge< unsigned long,unsigned long,bool,bool,true > >' in template 'itk::CellInterface'
>
>
> _____________________________________
> Powered by www.kitware.com<http://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


_____________________________________
Powered by www.kitware.com<http://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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20160628/aa2dc2cf/attachment-0001.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