Giter Club home page Giter Club logo

mmpld's People

Contributors

crowbar27 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

gralkapk

mmpld's Issues

List header uses 32-bit range specification for 64-bit intensity values

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.

mmpld::file_view

A view for in-memory MMPLD data would be nice. The interface should be similar to mmpld::file.

Streaming conversion

It would be nice to have a read function which performs particle conversion to a compile time-defined format.

Low-level API and file class cannot handle MMPLD 1.1

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.