<commit_before>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    TubeSpatialObject.cxx
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Insight Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

// Software Guide : BeginLatex
//
// \index{itk::TubeSpatialObject}
// TubeSpatialObject defines an n-dimensional tube.  A tube is defined as a
// list of centerline points which have a position, a radius, some normals
// and other properties. Let's start by including the appropriate header
// file.
//
// Software Guide : EndLatex 

// Software Guide : BeginCodeSnippet
#include "itkTubeSpatialObject.h"
#include "itkTubeSpatialObjectPoint.h"
// Software Guide : EndCodeSnippet

int main( int , char *[] )
{
// Software Guide : BeginLatex
//
// TubeSpatialObject is templated over the dimension of the space.  A
// TubeSpatialObject contains a list of TubeSpatialObjectPoints.
//
// First we define some type definitions and we create the tube.
//
// Software Guide : EndLatex 

// Software Guide : BeginCodeSnippet
  typedef itk::TubeSpatialObject<3>            TubeType;
  typedef TubeType::Pointer                    TubePointer;
  typedef itk::TubeSpatialObjectPoint<3>       TubePointType;
  typedef TubePointType::CovariantVectorType   VectorType;

  TubePointer tube = TubeType::New();
// Software Guide : EndCodeSnippet

// Software Guide : BeginLatex
//
// We create a point list and we set:
// \begin{enumerate}
// \item The position of each point in the local coordinate system using the 
// SetPosition() method.
// \item The radius of the tube at this position using SetRadius().
// \item The two normals at the tube is set using SetNormal1() and 
// SetNormal2().
// \item The color of the point is set to red in our case.
// \end{itemize}  
//
// Other values can be set to tell how well the tube was extracted from the
// image.  These values are indeed optional if the tube is not extracted from
// an image.  First, the ridgeness coefficient tells how well the extracted
// tube falls into a ridge.  Second, the medialness value shows how medial
// the point is on the ridge. Third and last, the branchness value tends to
// take a high value when a branch is present nearby the centerline point.
// All these values can be set using SetRidgeness(), SetMedialness(),
// SetBranchness().
//
// Software Guide : EndLatex 

// Software Guide : BeginCodeSnippet
  TubeType::PointListType list;
  for( unsigned int i=0; i<5; i++)
    {
    TubePointType p;
    p.SetPosition(i,i+1,i+2);
    p.SetRadius(1);
    VectorType normal1;
    VectorType normal2;
    for(unsigned int j=0;j<3;j++)
      {
      normal1[j]=j;
      normal2[j]=j*2;
      }
    
    p.SetNormal1(normal1);<commit_msg>DOC: small change on itemize vs enumerate environment.<commit_after>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    TubeSpatialObject.cxx
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) 2002 Insight Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even 
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

// Software Guide : BeginLatex
//
// \index{itk::TubeSpatialObject}
// TubeSpatialObject defines an n-dimensional tube.  A tube is defined as a
// list of centerline points which have a position, a radius, some normals
// and other properties. Let's start by including the appropriate header
// file.
//
// Software Guide : EndLatex 

// Software Guide : BeginCodeSnippet
#include "itkTubeSpatialObject.h"
#include "itkTubeSpatialObjectPoint.h"
// Software Guide : EndCodeSnippet

int main( int , char *[] )
{
// Software Guide : BeginLatex
//
// TubeSpatialObject is templated over the dimension of the space.  A
// TubeSpatialObject contains a list of TubeSpatialObjectPoints.
//
// First we define some type definitions and we create the tube.
//
// Software Guide : EndLatex 

// Software Guide : BeginCodeSnippet
  typedef itk::TubeSpatialObject<3>            TubeType;
  typedef TubeType::Pointer                    TubePointer;
  typedef itk::TubeSpatialObjectPoint<3>       TubePointType;
  typedef TubePointType::CovariantVectorType   VectorType;

  TubePointer tube = TubeType::New();
// Software Guide : EndCodeSnippet

// Software Guide : BeginLatex
//
// We create a point list and we set:
// \begin{enumerate}
// \item The position of each point in the local coordinate system using the 
// SetPosition() method.
// \item The radius of the tube at this position using SetRadius().
// \item The two normals at the tube is set using SetNormal1() and 
// SetNormal2().
// \item The color of the point is set to red in our case.
// \end{enumerate}  
//
// Other values can be set to tell how well the tube was extracted from the
// image.  These values are indeed optional if the tube is not extracted from
// an image.  First, the ridgeness coefficient tells how well the extracted
// tube falls into a ridge.  Second, the medialness value shows how medial
// the point is on the ridge. Third and last, the branchness value tends to
// take a high value when a branch is present nearby the centerline point.
// All these values can be set using SetRidgeness(), SetMedialness(),
// SetBranchness().
//
// Software Guide : EndLatex 

// Software Guide : BeginCodeSnippet
  TubeType::PointListType list;
  for( unsigned int i=0; i<5; i++)
    {
    TubePointType p;
    p.SetPosition(i,i+1,i+2);
    p.SetRadius(1);
    VectorType normal1;
    VectorType normal2;
    for(unsigned int j=0;j<3;j++)
      {
      normal1[j]=j;
      normal2[j]=j*2;
      }
    
    p.SetNormal1(normal1);
{'fraction_non_alphanumeric': 0.13266739503667863, 'fraction_numerical': 0.0068674886842515995, 'mean_word_length': 3.3980782429649965, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '243790', 'n_tokens_mistral': 1860, 'n_tokens_neox': 1775, 'n_words': 698}