[Insight-users] change vector length of itkVectorImage at runtime

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Sep 11 07:41:53 EDT 2013


Hello,

There is not resize in place for the vector pixels. That is a lot of copying to get to an undefined state. It's better to copy as you know what the new values should be.

Have you looked into the ComposeImageFilter?

http://www.itk.org/Doxygen/html/classitk_1_1ComposeImageFilter.html

You should be able to join 2 vector images together. If the second vector image has the new values you want then it should be able to efficiently create the new vector image. 

Brad

On Sep 11, 2013, at 6:51 AM, sebastian ordas <sebastian.ordas at gmail.com> wrote:

> Hello,
> 
> I would like to change the vector length of an itk::VectorImage at runtime.
> 
> e.g.:
> 
> image->SetVectorLength(Components+1);
> image->Allocate();
> 
> My problem is that previous components are overwritten
> Is it possible to this on the fly? or should I create a new VectorImage
> and transfer the image components one by one?
> 
> many thanks,
> sebastian
> _____________________________________
> 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://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list