<div>Hi</div>Unless I'm missing some strange operator overloading, should lines 18 and 20 be something like A[i][j] instead of A[i,j]?<div><br></div><div>regards<br><div><br></div><div><br><div class="gmail_quote">On Tue, Jun 7, 2011 at 12:37 PM, David Soto <span dir="ltr"><<a href="mailto:sotin1985@gmail.com">sotin1985@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi I have some problems with the next code: <br><br>typedef T InputPixelType;<br> typedef float OutputPixelType; <br>
typedef itk::Image< InputPixelType, 3 > InputImageType;<br> typedef itk::Image< OutputPixelType, 3 > OutputImageType;<br>
<br>InputImageType::PointType lpsPoint;<br> InputImageType::IndexType indexArtery;<br><br> lpsPoint[0] = artery[0]; <br> lpsPoint[1] = artery[1];<br> lpsPoint[2] = artery[2]; <br><br>vnl_matrix<double> A(26,26);<br>
<br> for ( int i = 0 ; i < imageVector.size() ; i++ )<br> {<br> <br> for (int i=0; i<26; i++)<br> {<br> for(int j=0; j<26; j++)<br> {<br> if (i<=j) {<br>
<br> A[i,j]=(4*(imageVector[i-j]->GetPixel(indexArtery))+(imageVector[i-j-1]->GetPixel(indexArtery))+(imageVector[i-j+1]->GetPixel(indexArtery)))/6; <br> }<br> else A[i,j]=0;<br>
<br> }<br> }<br><br>in imageVector I previously put 26 diferents CT volums. <br><br>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*'<br>
<br>And another mistake in the line number 20 (else A[i,j]=0;) that say: the left operator must be value L<br><br>I hope anyone could help me, thank you so much<br>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a><br>
</div></div>