ITK/Examples/Curves/PolyLineParametricPath: Difference between revisions

From KitwarePublic
< ITK‎ | Examples
Jump to navigationJump to search
(Created page with "==PolyLineParametricPath.cxx== <source lang="cpp"> #include "itkPolyLineParametricPath.h" int main(int argc, char *argv[]) { typedef itk::PolyLineParametricPath< 2 > PathType;...")
 
(Deprecated content that is moved to sphinx)
 
(3 intermediate revisions by one other user not shown)
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 argc, char *argv[])
{
  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>
 
{{ITKVTKCMakeLists|PolyLineParametricPath|}}

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.