[Kst] Extending DataVector::DataInfo?

Nicolas Brisset nicolas.brisset at free.fr
Mon May 20 21:03:35 UTC 2013


Hi,

Looking again at the patch proposed recently for netcdf vectors with "compression" where a scale and offset should be used, I realize that it needs to be rewritten so that we cache the required info instead of calling the datasource constantly to query the same information all the time. 
Instead of adding another QMap to hold that information, I thought that it may be more elegant to extend DataVector::DataInfo.

    struct KSTCORE_EXPORT DataInfo
    {
      DataInfo();
      DataInfo(int frameCount, int samplesPerFrame);

      int frameCount;
      int samplesPerFrame;
    };

Peter/Barth: what do you suggest? I'd need to store a bool (use scaling yes/no) and two doubles (scale factor and offset) for each vector.

Thanks,

Nicolas


More information about the Kst mailing list