MCPcopy Create free account
hub / github.com/Kitware/VTK / ReadPolygonObject

Method ReadPolygonObject

IO/MINC/vtkMNIObjectReader.cxx:586–633  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

584
585//------------------------------------------------------------------------------
586int vtkMNIObjectReader::ReadPolygonObject(vtkPolyData* output)
587{
588 // Read the surface property
589 if (this->ReadProperty(this->Property) == 0)
590 {
591 return 0;
592 }
593
594 // Read the number of points
595 vtkIdType numPoints = 0;
596 if (this->ReadNumberOfPoints(&numPoints) == 0)
597 {
598 return 0;
599 }
600
601 // Read the points
602 if (this->ReadPoints(output, numPoints) == 0)
603 {
604 return 0;
605 }
606
607 // Read the normals
608 if (this->ReadNormals(output, numPoints) == 0)
609 {
610 return 0;
611 }
612
613 // Read the number of items
614 vtkIdType numCells = 0;
615 if (this->ReadNumberOfCells(&numCells) == 0)
616 {
617 return 0;
618 }
619
620 // Read the colors
621 if (this->ReadColors(this->Property, output, numPoints, numCells) == 0)
622 {
623 return 0;
624 }
625
626 // Read the cells
627 if (this->ReadCells(output, numCells, VTK_POLYGON) == 0)
628 {
629 return 0;
630 }
631
632 return 1;
633}
634
635//------------------------------------------------------------------------------
636int vtkMNIObjectReader::ReadLineObject(vtkPolyData* output)

Callers 1

ReadFileMethod · 0.95

Calls 7

ReadPropertyMethod · 0.95
ReadNumberOfPointsMethod · 0.95
ReadPointsMethod · 0.95
ReadNormalsMethod · 0.95
ReadNumberOfCellsMethod · 0.95
ReadColorsMethod · 0.95
ReadCellsMethod · 0.95

Tested by

no test coverage detected