[Insight-developers] itk::Matrix initialized when execution problem

Arnaud Gelas arnaud_gelas at hms.harvard.edu
Wed Apr 14 16:00:48 EDT 2010


Hi Nicolas,

The size of the matrix for an itk::Matrix needs to be fixed, and  
declared as const unsigned.

For instance, you can declare an itk::Matrix
const unsigned int nrow = 4;
const unsigned int ncol = 5;
itk::Matrix< float, nrow, ncol > distance;

If you want to change the dimension of the matrix at run time, you  
should probably have a look at vnl_matrix

http://www.lems.brown.edu/vision/vxl_doc/html/core/vnl/html/classvnl__matrix.html

HTH,
Arnaud

On Apr 14, 2010, at 3:50 PM, Nicolas DEGARNE wrote:

> Hello everybody!
>
> I'm new on itk and I would like to use matrices with "itk::matrix"
>
> I have a question and a problem:
>
> 1°) I can't succed to create a matrice when the size is only know  
> while the execution.
>
> #           int p=readontxt(test.txt);
> #           itk::Matrix<float,p,p> distance;
>
>
> 2°)I would like to know if a fonction exist to find value on the  
> matrix like
>
> #           inst distmax=10;
> #           distance.find(>distmax)
>
> Thanks for advance
>
> Best regards
>
> Nicolas
>
> Hotmail débarque sur votre téléphone ! Paramétrez Hotmail sur votre  
> téléphone! Gratuit ! <ATT00001..txt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100414/7390dc3b/attachment.htm>


More information about the Insight-developers mailing list