[Insight-developers] VectorType of itk::LevelSetFunction is FixedArray. Why not Vector?

Zachary Pincus zpincus at stanford.edu
Mon Jul 4 23:18:16 EDT 2005


Hi guys,

The base class for level set functions in ITK (itk::LevelSetFunction) 
typedef's VectorType as a FixedArray. This means that custom edge 
advection images need to have FixedArrays as pixels, which is 
inconvenient because most of the ImageWriter classes that deal with 
vector images only work with Vector-typed pixels, not FixedArray-typed 
pixels. Moreover, there are many appropriate numeric traits defined for 
Vector, but none for FixedArray -- this makes using filters on 
FixedArray images more challenging.

Is there any reason why FixedArray images are used in this case and not 
Vector images? Do FixedArrays have fewer data members or fewer virtual 
functions so that using them is significantly faster? Or is there some 
other advantage? If not, is there any reason not to change the 
LevelSetFunction typedef to Vector instead of FixedArray? (And you guys 
prudently wouldn't want to make this an ITK-wide change, is there any 
reason I wouldn't want change it for my own ITK checkout?)

Sure, I can pixel-by-pixel copy a Vector image to a FixedArray image, 
but if it's not necessary that's better for me.

Zach



More information about the Insight-developers mailing list