[Insight-users] Summing over Voxels

John Drescher drescherjm at gmail.com
Fri Feb 17 10:14:31 EST 2012


> I was wondering, if there is any function in ITK, which will sum all the
> values in the voxels in a region.

I'll let the experts answer that one. I am sure there is a filter or
combination of filters that allow this.

> If I iterate over the region, it is very
> time consuming.

I have never found iterating (using the itk iterators) over a 3D
region to be that time consuming. Are you using really huge images of
10s of GB or something like that? Or are you testing in Debug mode
only? On windows Debug mode can be 100 times slower than release mode.
The itk iterators are pretty efficient. There are also some filters
that can help possibly itk::UnaryFunctionFilter<> and a lot of these
will use more than 1 thread.

>
> For example, I am looking for some functionality similar to sum(v) in
> matlab, where v is a vector..

At some level the same iteration must take place.

John


More information about the Insight-users mailing list