[Insight-users] help with code
Sergio Vera
sergio.vera at alma3d.com
Tue Jun 7 07:15:14 EDT 2011
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110607/f7614363/attachment.htm>
More information about the Insight-users
mailing list