[Insight-users] How to sum pixels row-by-row?

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Feb 2 16:43:27 EST 2007


Le Fri, 02 Feb 2007 17:15:57 +0100, Ali - <saveez at hotmail.com> a écrit:

> >> > It is strange how ITK can perform so many elaborated image  
> processings,> > but it takes hours to figure out how to implement some  
> elementary matrix> > manipulations. I thought the inclusion of VXL in  
> ITK means having a fast> > MATLAB-style image processing toolkit in c++.
> >> That's right that many filters are missing to perform simple tasks.
> > ITK is open source, and open to contributions. Feel free to contribute 
> > contribute new code to the insight journal :-)

> Even if the community provides it, I think it is not a good idea to 
> create a 'database' of all operations for images and I have at least 2  
> reasons for that.
>  First, it is really hard to find out which class does what operation  
> simply by guessingfrom its name. Secondly, not all the operations can be  
> created as a linear combinationof the simple operations. This means you  
> have to write filters forever, many of them may beused only once.
>For example, the slice-by-slice filter you provides does not accept  
> binary filtersto operate on each slice.

No a so good example: the last version of the slice by slice filter can  
use several inputs.
http://voxel.jouy.inra.fr/darcsweb/darcsweb.cgi?r=sliceBySlice;a=summary

And the next version will be able to produce image with a different output  
size than the input image, to produce several images, and to support a  
pipeline of filters instead of a single filter.

> So, if I want to divide an N x N image A to a 1 x N image Brow-by-row, I  
> have to modify the slice-by-slice filter. In the matrix form, this can be 
> down simply by 'literally' one line: B->GetTranspose() * A.
> Can you tell me how it is possible to covert images to matrices and vice  
> vera? I know ITKuses VNL matrices but I cannot see where this is used to  
> maniplulate image pixels directly.If this can be done, we won't need  
> hundereds of image operation classes.

Sorry, I don't know how to do that - but others may be able to help better  
than me on that point.

Gaetan


-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr


More information about the Insight-users mailing list