Write a PointSet#


Write a PointSet


Stores all points



#include "itkPointSet.h"

main(int argc, char * argv[])
  // Verify the number of parameters in the command line
  if (argc < 1)
    std::cerr << "Usage: " << std::endl;
    std::cerr << argv[0] << " outputFile " << std::endl;
    return EXIT_FAILURE;

  std::string outputFilename = argv[1];

  // Store points
  typedef itk::PointSet<double, 3> PointSetType;
  auto                             pointsSet = PointSetType::New();
  typedef PointSetType::PointType  PointType;

  return EXIT_SUCCESS;

Classes demonstrated#

template<typename TPixelType, unsigned int VDimension = 3, typename TMeshTraits = DefaultStaticMeshTraits<TPixelType, VDimension, VDimension>>
class PointSet : public itk::DataObject

A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute) definition.

PointSet is a superclass of the N-dimensional mesh structure (itk::Mesh). It provides the portion of the mesh definition for geometric coordinates (and associated attribute or pixel information). The defined API provides operations on points but does not tie down the underlying implementation and storage. A “MeshTraits” structure is used to define the container and identifier to access the points. See DefaultStaticMeshTraits for the set of type definitions needed. All types that are defined in the “MeshTraits” structure will have duplicate type alias in the resulting mesh itself.

PointSet has two template parameters. The first is the pixel type, or the type of data stored (optionally) with the points. The second is the “MeshTraits” structure controlling type information characterizing the point set. Most users will be happy with the defaults, and will not have to worry about this second argument.

Template parameters for PointSet:

TPixelType = The type stored as data for the point.

TMeshTraits = Type information structure for the point set.

ITK Sphinx Examples:

Subclassed by itk::Mesh< TPixelType, VDimension, TMeshTraits >

See itk::PointSet for additional documentation.