本文整理汇总了C++中imagegeom::Pointer::readGeometryFromHDF5方法的典型用法代码示例。如果您正苦于以下问题:C++ Pointer::readGeometryFromHDF5方法的具体用法?C++ Pointer::readGeometryFromHDF5怎么用?C++ Pointer::readGeometryFromHDF5使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类imagegeom::Pointer
的用法示例。
在下文中一共展示了Pointer::readGeometryFromHDF5方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: gSentinel
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
int DataContainer::readMeshDataFromHDF5(hid_t dcGid, bool preflight)
{
herr_t err = 0;
unsigned int geometryType = DREAM3D::GeometryType::UnknownGeometry;
err = QH5Lite::readScalarAttribute(dcGid, DREAM3D::Geometry::Geometry, DREAM3D::Geometry::GeometryType, geometryType);
if (err < 0)
{
return err;
}
hid_t geometryId = H5Gopen(dcGid, DREAM3D::Geometry::Geometry.toLatin1().data(), H5P_DEFAULT);
if (geometryId < 0)
{
return -1;
}
HDF5ScopedGroupSentinel gSentinel(&geometryId, false);
IGeometry::Pointer geomPtr = IGeometry::NullPointer();
if (NULL == m_Geometry.get())
{
switch(geometryType)
{
case DREAM3D::GeometryType::ImageGeometry:
{
ImageGeom::Pointer image = ImageGeom::New();
err = image->readGeometryFromHDF5(geometryId, preflight);
err = GeometryHelpers::GeomIO::ReadMetaDataFromHDF5(dcGid, image);
setGeometry(image);
break;
}
case DREAM3D::GeometryType::VertexGeometry:
{
VertexGeom::Pointer vertices = VertexGeom::New();
err = vertices->readGeometryFromHDF5(geometryId, preflight);
err = GeometryHelpers::GeomIO::ReadMetaDataFromHDF5(dcGid, vertices);
setGeometry(vertices);
break;
}
case DREAM3D::GeometryType::EdgeGeometry:
{
EdgeGeom::Pointer edges = EdgeGeom::New();
err = edges->readGeometryFromHDF5(geometryId, preflight);
err = GeometryHelpers::GeomIO::ReadMetaDataFromHDF5(dcGid, edges);
setGeometry(edges);
break;
}
case DREAM3D::GeometryType::TriangleGeometry:
{
TriangleGeom::Pointer triangles = TriangleGeom::New();
err = triangles->readGeometryFromHDF5(geometryId, preflight);
err = GeometryHelpers::GeomIO::ReadMetaDataFromHDF5(dcGid, triangles);
setGeometry(triangles);
break;
}
case DREAM3D::GeometryType::QuadGeometry:
{
QuadGeom::Pointer quads = QuadGeom::New();
err = quads->readGeometryFromHDF5(geometryId, preflight);
err = GeometryHelpers::GeomIO::ReadMetaDataFromHDF5(dcGid, quads);
setGeometry(quads);
break;
}
case DREAM3D::GeometryType::UnknownGeometry:
setGeometry(geomPtr);
break;
default:
setGeometry(geomPtr);
break;
}
}
return err;
}