ITK/Examples/Curves/PolyLineParametricPath: Difference between revisions

From KitwarePublic
< ITK‎ | Examples
Jump to navigationJump to search
(Unused argc/argv)
(Deprecated content that is moved to sphinx)
 
Line 1: Line 1:
==PolyLineParametricPath.cxx==
{{warning|1=The media wiki content on this page is no longer maintained. The examples presented on the https://itk.org/Wiki/* pages likely require ITK version 4.13 or earlier releases.   In many cases, the examples on this page no longer conform to the best practices for modern ITK versions.}}
<source lang="cpp">
#include "itkPolyLineParametricPath.h"
 
int main(int, char *[])
{
  typedef itk::PolyLineParametricPath< 2 > PathType;
 
  PathType::Pointer path = PathType::New();
  path->Initialize();
 
  typedef PathType::ContinuousIndexType    ContinuousIndexType;
 
  // Create a line
  for(unsigned int i = 0; i < 20; ++i)
    {
    ContinuousIndexType cindex;
    cindex[0] = 0;
    cindex[1] = i;
    path->AddVertex( cindex );
    }
       
  const PathType::VertexListType * vertexList = path->GetVertexList ();
 
   for(unsigned int i = 0; i < vertexList->Size(); ++i)
    {
    std::cout << vertexList->GetElement(i) << std::endl;
    }
   
  return EXIT_SUCCESS;
}
 
</source>
 
{{ITKCMakeLists|{{SUBPAGENAME}}}}

Latest revision as of 19:23, 6 June 2019

Warning: The media wiki content on this page is no longer maintained. The examples presented on the https://itk.org/Wiki/* pages likely require ITK version 4.13 or earlier releases. In many cases, the examples on this page no longer conform to the best practices for modern ITK versions.