~ubuntu-branches/ubuntu/precise/insighttoolkit/precise

« back to all changes in this revision

Viewing changes to Code/SpatialObject/itkMetaLineConverter.txx

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2008-05-31 12:07:29 UTC
  • mfrom: (3.1.3 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080531120729-7g7layn480le43ko
Tags: 3.6.0-3
* debian/patches/gccxml-workaround.patch: New.  Work around gccxml issue
  with #include_next; c.f. http://www.gccxml.org/Bug/view.php?id=7134.  
* debian/patches/gcc43.patch: include <cstring> in itkNeighbourhood.h.
  This only showed up in the tcl wrapping step.

* Above two entries fix FTBFS for GCC 4.3-based systems.
  Closes: #478500.

* debian/patches/sharedforward.patch: New.  Ensure that linux/sparc
  systems are not also configured as a SUN sparc system, which requires
  SUN header sys/isa_defs.h.  Closes: #478940, #483312.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
  Program:   Insight Segmentation & Registration Toolkit
4
4
  Module:    $RCSfile: itkMetaLineConverter.txx,v $
5
5
  Language:  C++
6
 
  Date:      $Date: 2007/01/28 19:24:56 $
7
 
  Version:   $Revision: 1.4 $
 
6
  Date:      $Date: 2008-01-07 21:48:41 $
 
7
  Version:   $Revision: 1.6 $
8
8
 
9
9
  Copyright (c) Insight Software Consortium. All rights reserved.
10
10
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
44
44
  double spacing[NDimensions];
45
45
 
46
46
  unsigned int ndims = Line->NDims();
47
 
  for(unsigned int i=0;i<ndims;i++)
 
47
  for(unsigned int ii=0;ii<ndims;ii++)
48
48
    {
49
 
    spacing[i]=Line->ElementSpacing()[i];
 
49
    spacing[ii]=Line->ElementSpacing()[ii];
50
50
    }
51
51
  line->GetIndexToObjectTransform()->SetScaleComponent(spacing);
52
52
  line->GetProperty()->SetName(Line->Name());
66
66
    
67
67
  vnl_vector<double> v(ndims);
68
68
  
69
 
  for(unsigned int id=0;id< Line->GetPoints().size();id++)
 
69
  for(unsigned int identifier=0;identifier< Line->GetPoints().size();identifier++)
70
70
    {
71
71
    LinePointType pnt;
72
72
    
74
74
    PointType point;
75
75
    typedef typename LinePointType::VectorType NormalType;
76
76
 
77
 
    for(unsigned int i=0;i<ndims;i++)
 
77
    for(unsigned int ii=0;ii<ndims;ii++)
78
78
      {
79
 
      point[i]=(*it2)->m_X[i];
 
79
      point[ii]=(*it2)->m_X[ii];
80
80
      }
81
81
 
82
82
    pnt.SetPosition(point);
83
83
 
84
 
    for(unsigned int i=0;i<ndims-1;i++)
 
84
    for(unsigned int ii=0;ii<ndims-1;ii++)
85
85
      {
86
86
      NormalType normal;
87
 
      for(unsigned int j=0;j<ndims;j++)
 
87
      for(unsigned int jj=0;jj<ndims;jj++)
88
88
        {
89
 
        normal[j]=(*it2)->m_V[i][j];
 
89
        normal[jj]=(*it2)->m_V[ii][jj];
90
90
        }
91
 
      pnt.SetNormal(normal,i);
 
91
      pnt.SetNormal(normal,ii);
92
92
      }
93
93
 
94
94
    
151
151
    }
152
152
 
153
153
  float color[4];
154
 
  for(unsigned int i=0;i<4;i++)
 
154
  for(unsigned int ii=0;ii<4;ii++)
155
155
    {
156
 
    color[i]=spatialObject->GetProperty()->GetColor()[i];
 
156
    color[ii]=spatialObject->GetProperty()->GetColor()[ii];
157
157
    }
158
158
 
159
159
  Line->Color(color);