[Insight-developers] Best way to concatenate itk Arrays?

Nicholas Tustison ntustison at gmail.com
Thu Dec 9 16:37:54 EST 2010


Hi Michael,

You should look in the BSplineDeformableTransform class where the data_block() function is accessed directly.

Nick


On Dec 9, 2010, at 4:18 PM, Michael Stauffer (Circular Logic) wrote:

> Hi,
> 
> I need to concatenate itk Arrays (Transform::ParameterType objects,
> actually) into a single new Array. Is it acceptable to directly use the
> underlying public vnl_vector routines like data_block() and copy_out()
> to do this efficiently? Or must I copy element-by-element using
> Array::GetElement(). Or is there some other way I'm missing?
> 
> I could add an Insert method to Array that allows inserting of another
> array at a given index, in order to avoid using the vnl_vector routines
> directly.
> 
> This is part of the new CompositeTransform class. We're set-ing and
> get-ing concatenated parameter arrays that hold the parameters for all
> the constituent transforms in the composite class. We may have dozens of
> transforms at once, so element-by-element copying will start to add up
> over all the calls to get and set parameters made by the optimizer in
> the registration process.
> 
> Cheers,
> Michael
> 
> _______________________________________________
> 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://kitware.com/products/protraining.html
> 
> 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-developers



More information about the Insight-developers mailing list