[Insight-users] help with code
David Soto
sotin1985 at gmail.com
Tue Jun 7 07:28:54 EDT 2011
ok, it's true thank you
2011/6/7 Vincent Garcia <vincent.garcia at inria.fr>
> It should be A(i,j) and not A[i,j].
>
>
> http://www.itk.org/Doxygen320/html/classitk_1_1Matrix.html#a36a2d0bf5ced1f359da76358506e0948
>
> Vincent
>
> ------------------------------
>
> *From: *"Sergio Vera" <sergio.vera at alma3d.com>
> *To: *"David Soto" <sotin1985 at gmail.com>
> *Cc: *insight-users at itk.org
> *Sent: *Tuesday, 7 June, 2011 1:15:14 PM
> *Subject: *Re: [Insight-users] help with code
>
>
> Hi
> Unless I'm missing some strange operator overloading, should lines 18 and
> 20 be something like A[i][j] instead of A[i,j]?
>
> regards
>
>
> On Tue, Jun 7, 2011 at 12:37 PM, David Soto <sotin1985 at gmail.com> wrote:
>
>> Hi I have some problems with the next code:
>>
>> typedef T InputPixelType;
>> typedef float OutputPixelType;
>> typedef itk::Image< InputPixelType, 3 > InputImageType;
>> typedef itk::Image< OutputPixelType, 3 > OutputImageType;
>>
>> InputImageType::PointType lpsPoint;
>> InputImageType::IndexType indexArtery;
>>
>> lpsPoint[0] = artery[0];
>> lpsPoint[1] = artery[1];
>> lpsPoint[2] = artery[2];
>>
>> vnl_matrix<double> A(26,26);
>>
>> for ( int i = 0 ; i < imageVector.size() ; i++ )
>> {
>>
>> for (int i=0; i<26; i++)
>> {
>> for(int j=0; j<26; j++)
>> {
>> if (i<=j) {
>>
>>
>> A[i,j]=(4*(imageVector[i-j]->GetPixel(indexArtery))+(imageVector[i-j-1]->GetPixel(indexArtery))+(imageVector[i-j+1]->GetPixel(indexArtery)))/6;
>>
>> }
>> else A[i,j]=0;
>>
>> }
>> }
>>
>> in imageVector I previously put 26 diferents CT volums.
>>
>> And when I go to compile it, I get some mistakes,in the line number 18
>> (bucle if... A[i,j]=...) they say It's not possible make the conversion
>> 'InputPixelType' to 'double*' , 'int' to 'double* , 'OutputPixelType' to
>> 'double*' and 'unsigned long' to 'double*'
>>
>> And another mistake in the line number 20 (else A[i,j]=0;) that say: the
>> left operator must be value L
>>
>> I hope anyone could help me, thank you so much
>>
>> _____________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Kitware offers ITK Training Courses, for more information visit:
>> http://www.kitware.com/products/protraining.html
>>
>> Please keep messages on-topic and check the ITK FAQ at:
>> http://www.itk.org/Wiki/ITK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.itk.org/mailman/listinfo/insight-users
>>
>>
>
>
> --
> Sergio Vera
>
> Alma IT Systems
> C/ Vilana, 4B, 4º 1ª
> 08022 Barcelona
> T. (+34) 932 380 592
> www.alma3d.com
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110607/944f8991/attachment.htm>
More information about the Insight-users
mailing list