ITK/Examples/SpatialObjects/BlobSpatialObject: Difference between revisions

From KitwarePublic
< ITK‎ | Examples
Jump to navigationJump to search
No edit summary
(deprecated content that is moved to sphinx)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
==BlobSpatialObject.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 "itkBlobSpatialObject.h"
 
int main( int argc, char *argv[] )
{
  typedef itk::BlobSpatialObject<2> BlobType;
 
  // Create a list of points
  BlobType::PointListType points;
   for(unsigned int i = 0; i < 20; i++)
    {
    BlobType::BlobPointType point;
    point.SetPosition(i,i);
 
    points.push_back(point);
    }
 
  BlobType::Pointer blob = BlobType::New();
  blob->SetPoints(points);
 
  BlobType::BoundingBoxType::BoundsArrayType bounds = blob->GetBoundingBox()->GetBounds();
  std::cout << "Bounds: " << bounds << std::endl;
 
  return EXIT_SUCCESS;
}
 
</source>
 
{{ITKCMakeLists|BlobSpatialObject}}

Latest revision as of 14:19, 7 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.