[Insight-users] itkSymmetricEigenAnalysisImageFilter

Ruben Schilling r.b.schilling at googlemail.com
Thu Aug 23 14:57:14 EDT 2007


Hi Jone,

I agree, that the ITK implementation is inefficient here, because  
IMHO it does not make much sense to have an image to image filter for  
Hessian calculations!! Actually you would keep here 9 (!) copies,  
since the Hessian is a 3x3 matrix (2nd order tensor) for 3D data. You  
can easily reach Gigabytes for a single 3D volumes.

One way you can get around this is, that you compute gradients  
voxelwise and then compute the gradient of the gradient. This is much  
more efficient, as mostly, when one needs a Hessian, one needs a  
gradient for some constraints first. If you can live with that you  
pretty much end up with only one Hessian matrix at a time in memory.  
There is no implementation ready in ITK, that does that out of the  
box as far as I know. Although it wouldn't be difficult to implement.  
You just need an image iterator, that supports voxel wise operations.  
Then you walk the entire image (or just a mask) and compute the  
hessian and gradients everywhere on the fly.

For the eigenvectors note, that your image must be smooth to assume,  
that it is really symmetric and hence eigenvalues are real valued.  
You can get the eigenvalues then by standard QR decomposition, which  
you can not do in ITK, but in most numerical libraries. You could  
even solve the eigenvalue problem analytically for the 3D data by a  
linear equation solver, but this is slower.

Regards,
Ruben




Am 23.08.2007 um 17:31 schrieb Patric:

> Ruben,
>
> I want to compute the hessian matrix of a 3D image and its  
> eigenvalue. I found it will need a lot of memory for maintaining  
> six copies of the 3D data because each data is a second derirative.  
> Is that right?
>
> Is there any other way that I don't need to maintain six copies of  
> the datasets? it will be great if you can give me some code to  
> demonstrate this.
>
> thanks,
> -Jone



More information about the Insight-users mailing list