unistuttgart-visus / mmpld Goto Github PK
View Code? Open in Web Editor NEWC++ standalone library for loading MegaMol's MMPLD particle files.
License: MIT License
C++ standalone library for loading MegaMol's MMPLD particle files.
License: MIT License
If the colour_type
is colour_type::intensity64
, the list header still reads two 32-bit floats as range. This seems to be a specification bug for 1.3, because it does not make sense that the range limits for the transfer function limit the possible range of data values.
Issue is in read_list_header
in list_header.inl
.
A view for in-memory MMPLD data would be nice. The interface should be similar to mmpld::file.
It would be nice to have a read function which performs particle conversion to a compile time-defined format.
MMPLD 1.1 holds a cluster list at the end each particle list, which we cannot skip in the low-level API nor in the file
class. Code from MegaMol:
pts.SetCount(*this->dat.AsAt<UINT64>(p)); p += 8;
if (this->fileVersion == 103) {
auto const box = this->dat.AsAt<float>(p);
vislib::math::Cuboid<float> bbox;
bbox.Set(box[0], box[1], box[2], box[3], box[4], box[5]);
pts.SetBBox(bbox);
p += 24;
}
pts.SetVertexData(vrtDatType, this->dat.At(p), stride);
pts.SetColourData(colDatType, this->dat.At(p + vrtSize), stride);
p += static_cast<SIZE_T>(stride * pts.GetCount());
if (this->fileVersion == 101) {
// TODO: who deletes this?
SimpleSphericalParticles::ClusterInfos *ci = new SimpleSphericalParticles::ClusterInfos();
ci->numClusters = *this->dat.AsAt<unsigned int>(p); p += sizeof(unsigned int);
ci->sizeofPlainData = *this->dat.AsAt<size_t>(p); p += sizeof(size_t);
ci->plainData = (unsigned int*)malloc(ci->sizeofPlainData);
memcpy(ci->plainData, this->dat.At(p), ci->sizeofPlainData); p += ci->sizeofPlainData;
pts.SetClusterInfos(ci);
}
As our library ignores these data, the entry points of the particle lists of an MMPLD 1.1 file are bogus.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.