[ITK] [ITK-users] VectorImage vs image of vectors

Olivier Commowick Olivier.Commowick at inria.fr
Mon Nov 3 09:39:53 EST 2014


Hello all,

I encountered some weird behavior in ITK. For some reason, I have in my code some vector images that I need to smooth using a Gaussian filter. It appears that whether the image is stored as a VectorImage or an Image of itk Vectors is actually extremely important in terms of performance for this task. Namely, if using VectorImages, the processing time can be much worse (30s vs 1s with an image of vectors). My problem is that I cannot really use the templated itk::Image <itk::Vectors <Type, Size> , Ndim > since I do not know Size at compilation time.

Looking deeper into the code, I have two questions for whoever would know about these images: 
- the first one is on the Variable length vector: it seems to me that the operator= method always starts by destroying current data, even if the vector size is the same. It doesn’t seem really efficient so I was wondering if there was any reason for that
- the second one is on the VectorImage itself: is there something in it that would justify the computation times to be much worse ?

If someone has any info on which image type I should be using or why VectorImage would be slower, I would be grateful.

Thanks in advance

---

Olivier Commowick, Ph.D.
Research Scientist
INRIA Rennes - Bretagne Atlantique, VISAGES Team
Campus de Beaulieu
35042 Rennes
FRANCE

Phone: +33 2 99 84 25 92
Email: Olivier.Commowick at inria.fr
Web: http://olivier.commowick.org/





_____________________________________
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