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

Matt McCormick matt.mccormick at kitware.com
Sun Jul 31 19:29:21 EDT 2016


Hi JP,

The ITK Python import time was increased by a factor of two in 4.10.0
compared to 4.9.0 by hiding symbols in the generated libraries. The
next release of ITK will improve the import time by a factor of ten in
some cases because the lazy loading has been fixed [1]. Instructions
to try out the development version can be found here [2].

HTH,
Matt

[1] http://review.source.kitware.com/#/c/21305/

[2] https://itk.org/Wiki/ITK/Git/Download

On Tue, Jun 28, 2016 at 4:59 AM,  <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>
> 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 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
>> >
>> > 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
>
> 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

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