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

Method InitializePointDatasets

IO/HDF/vtkHDFWriter.cxx:927–947  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

925
926//------------------------------------------------------------------------------
927bool vtkHDFWriter::InitializePointDatasets(hid_t group, vtkPoints* points)
928{
929 int components = 3;
930 hid_t datatype = vtkHDFUtilities::getH5TypeFromVtkType(VTK_DOUBLE);
931 if (points)
932 {
933 vtkAbstractArray* pointArray = points->GetData();
934 datatype = vtkHDFUtilities::getH5TypeFromVtkType(pointArray->GetDataType());
935 components = pointArray->GetNumberOfComponents();
936 }
937
938 // Create resizeable datasets for Points and NumberOfPoints
939 std::vector<hsize_t> pointChunkSize{ static_cast<hsize_t>(this->ChunkSize),
940 static_cast<hsize_t>(components) };
941 bool initResult = true;
942 initResult &= this->Impl->InitDynamicDataset(
943 group, "Points", datatype, components, pointChunkSize.data(), this->CompressionLevel);
944 initResult &= this->Impl->InitDynamicDataset(
945 group, "NumberOfPoints", H5T_STD_I64LE, SINGLE_COLUMN, SMALL_CHUNK);
946 return initResult;
947}
948
949//------------------------------------------------------------------------------
950bool vtkHDFWriter::InitializePrimitiveDataset(hid_t group)

Callers 1

Calls 5

InitDynamicDatasetMethod · 0.80
GetDataMethod · 0.45
GetDataTypeMethod · 0.45
GetNumberOfComponentsMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected