File Format Specification MMPLD Version: 1.2 Release Author: Sebastian Grottel Date:

Similar documents
CS 261 Fall Mike Lam, Professor Integer Encodings

ASPRS LiDAR SPRS Data Exchan LiDAR Data Exchange Format Standard LAS ge Format Standard LAS IIT Kanp IIT Kan ur

COMP2611: Computer Organization. Data Representation

World Inside a Computer is Binary

UNIT 7A Data Representation: Numbers and Text. Digital Data

SISTEMI EMBEDDED. Basic Concepts about Computers. Federico Baronti Last version:

Groups of two-state devices are used to represent data in a computer. In general, we say the states are either: high/low, on/off, 1/0,...

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation

LAS Specification Version 1.2 April 29, 2008

by Pearson Education, Inc. All Rights Reserved. 2

Lecture 12 Integers. Computer and Network Security 19th of December Computer Science and Engineering Department

Microsoft Compound Document File Format

Reminder: compiling & linking

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #3: Of Integers and Endians (pt. 2)

COP Programming Assignment #7

Chapter 1. Computer Abstractions and Technology. Lesson 3: Understanding Performance

C/C++ Programming for Engineers: Working with Integer Variables

Programming in C++ 6. Floating point data types

Representing Data Elements

A Fast Review of C Essentials Part I

SAS7BDAT Database Binary Format

M1 Computers and Data

l l l l l l l Base 2; each digit is 0 or 1 l Each bit in place i has value 2 i l Binary representation is used in computers

SPARK. Native Device Interface (NDI)

Exercise: Using Numbers

by Pearson Education, Inc. All Rights Reserved.

1 Digital tools. 1.1 Introduction

3. Except for strings, double quotes, identifiers, and keywords, C++ ignores all white space.

Memory and C/C++ modules

CP SC 4040/6040 Computer Graphics Images. Joshua Levine

OpenEXR File Layout. Last Update: 04/24/07

PowerLogic ION6200 Serial Communications Protocol and ION / Modbus Register Map

Number Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example

VComm Signal File Specification

Question 4: a. We want to store a binary encoding of the 150 original Pokemon. How many bits do we need to use?

These notes are designed to provide an introductory-level knowledge appropriate to understanding the basics of digital data formats.

Omni Flow Computer Master Driver v1.x Omni Flow Computer Master Modicon Compatible Driver 1.x

The type of all data used in a C (or C++) program must be specified

Fault Tolerance & Reliability CDA Chapter 2 Additional Interesting Codes

Data Storage and Query Answering. Data Storage and Disk Structure (4)

printf( Please enter another number: ); scanf( %d, &num2);

Computer (Literacy) Skills. Number representations and memory. Lubomír Bulej KDSS MFF UK

CSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York

C Programming. Course Outline. C Programming. Code: MBD101. Duration: 10 Hours. Prerequisites:

A First Program - Greeting.cpp

Lecture 2 Tao Wang 1

Transport Protocol (IEX-TP)

Interactive MATLAB use. Often, many steps are needed. Automated data processing is common in Earth science! only good if problem is simple

17. Instruction Sets: Characteristics and Functions

Data Types. Data Types. Integer Types. Signed Integers

Goals of C "" The Goals of C (cont.) "" Goals of this Lecture"" The Design of C: A Rational Reconstruction"

Memory Addressing, Binary, and Hexadecimal Review

COMP2121: Microprocessors and Interfacing. Number Systems

C How to Program, 7/e by Pearson Education, Inc. All Rights Reserved.

Declaration. Fundamental Data Types. Modifying the Basic Types. Basic Data Types. All variables must be declared before being used.

Avro Specification

,879 B FAT #1 FAT #2 root directory data. Figure 1: Disk layout for a 1.44 Mb DOS diskette. B is the boot sector.

14.4 Description of Huffman Coding

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

N1793: Stability of indeterminate values in C11

A First Book of ANSI C Fourth Edition. Chapter 8 Arrays

10.1. Unit 10. Signed Representation Systems Binary Arithmetic

3 Data Storage 3.1. Foundations of Computer Science Cengage Learning

ECE2049 HW #1-- C programming and Binary Number Representations (DUE 1/19/2018 At the BEGINNING of class)

unused unused unused unused unused unused

by Pearson Education, Inc. All Rights Reserved.

CS 31: Intro to Systems Binary Representation. Kevin Webb Swarthmore College January 27, 2015

Lecture 8: Pointer Arithmetic (review) Endianness Functions and pointers

CS2141 Software Development using C/C++ C++ Basics

Chapter 2 Bits, Data Types, and Operations

TA Document SMPTE Time Code and Sample Count Transmission Protocol Ver.1.0

9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation

Delphin 6 Output File Specification

Number System. Introduction. Decimal Numbers

ESc101 : Fundamental of Computing

ECE2049 HW #1-- C programming and Binary Number Representations (DUE Friday 8/31/2018 At the BEGINNING of class)

The SEG-Y Reader/Writer provides FME with direct access to data in SEG-Y format.

THE INTEGER DATA TYPES. Laura Marik Spring 2012 C++ Course Notes (Provided by Jason Minski)

RM0327 Reference manual

Programming in C++ 5. Integral data types

Modbus ASCII Serial Device Driver Help 2009 Kepware Technologies

DVRP Library Documentation

Binary Representations and Arithmetic

Version 3.1 Format Specification MDF Format 1. Format Specification MDF Format Version 3.1

Fundamentals of Programming. Lecture 11: C Characters and Strings

Main Memory Organization

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

Chapter 7. Basic Types

Chapter 3 Basic Data Types. Lecture 3 1

CHAPTER 3 Expressions, Functions, Output

Appendix D: POL A Binary File Format for Polygonal Models

Computers Programming Course 5. Iulian Năstac

Survey. Motivation 29.5 / 40 class is required

Data Representation 1

Run time environment of a MIPS program

Bits, Bytes and Integers

Data Representation and Storage. Some definitions (in C)

Avro Specification

Data Storage. August 9, Indiana University. Geoffrey Brown, Bryce Himebaugh 2015 August 9, / 19

Chapter 4: Computer Codes. In this chapter you will learn about:

Transcription:

File Format Specification MMPLD Version: 1.2 Release Author: Sebastian Grottel Date: 17.05.2016 Preface The file formats MMPLD and MMDPLD basically are binary memory dumps of MegaMol s internal data structures, namely the content of the MultiParticleDataCall. The corresponding data files can be loaded using the Modules MMPLDDataSource. To generate these files from any compatible data source you can use a Mega- Mol job based on the DataWriterJob and the Modules MMPLDWriter. See Appending A for an example project file. This file format is intended for visualization using MegaMol for simple, small and medium sized data sets (max. about 1 million particles and less than thousand configurations). Data in this file formats is stored as little-endian binary data. The term uint32 corresponds to a 32 bit large unsigned integer value; uint16 and uint64 are defined accordingly. The term byte corresponds to an 8 bit large unsigned integer value. The term float corresponds to a 32 bit large floating point value following the IEEE standard 1 (cf. real or single). The term double corresponds to a 64 bit large floating point value following the IEEE standard. MMPLD Version 1.2 Header Data The file starts with 60 bytes header data: Bytes Data Description 0..5 char* Magic identifier 6..7 unsigned int 16 bit Version number 8..11 unsigned int 32 bit Number of data frames 12..35 6x float (32 bit) Data set bounding box 36..59 6x float (32 bit) Data set clipping box The Magic identifier must have the value MMPLD\x00 as ASCII: 4D 4D 50 4C 44 00. The version number encodes the major version as multiple of 100 and adds the minor version. ver = maj_ver * 100 + min_ver maj_ver = ver / 100 min_ver = ver % 100 The version number must be 102 for this file format version. 1 IEEE Standard for Binary Floating-Point Arithmetic for microprocessor systems (ANSI/IEEE Std 754-1985) 1

The number of data frames must be at least 1. The remaining text will refer to this value as frame count. The data set bounding box is stored as six float values: minimum X value, minimum Y value, minimum Z value, maximum X value, maximum Y value, and maximum Z value. The differences between minimum and maximum value on each axis must not be zero or negative. The data set clipping box is stored in the same way as the bounding box. The bounding box specifies the reference bounding box of the data set, e.g. the simulation box size. The clipping box specifies the extent of the visual representations of the data set. For example, if the particle positions are always inside the bounding box, but the particles are represented as spheres with different radii, then the clipping box should be the bounding box inflated in all directions by the maximum sphere radius. Seek Table The seek table is stored directly following the header data. For each time frame one unsigned int 64 bit value is written. These values are the byte offsets from the beginning of the file to the beginning of the data of the corresponding time frame data. A value of zero (or less than 60) should be treated as error. An additional last unsigned int 64 bit value written specifies the byte offset from the beginning of the file to the end of the data of the last time frame. This value should be the file size itself. Trailing data should be ignored. All frame data must be stored consecutive without additional data. Thus the i th value specifies the byte offset to the beginning of the data for frame i and the i+1 th value specifies the byte offset to the end of the data for frame i (as well as the beginning of the data for frame i+1). Frame Data The first four bytes are interpreted as float value, representing the time stamp. (This field is present in format version 1.2 and later only.) The second four bytes of the frame data specify the number of particle lists as unsigned int 32 bit value. Then the data for each list is written, beginning with a list header: Bytes Data Description 0 byte Vertex data type 1 byte Color data type 2..5 float (32 bit) Global Radius [2 6]+0..3 4x byte Global RGB Color [2 6]+0..7 2x float (32 bit) Global intensity color range [2 6 +0..7 unsigned int 64 bit Particle Count 2

The vertex data type is one of the following values: Value Vertex Data Type Bytes per Particle Description 0 NONE 0 No vertex data is stored 1 FLOAT_XYZ 3*4=12 For each vertex, the position is stored as three float coordinates 2 FLOAT_XYZR 4*4=16 For each vertex, the position is stored as three float coordinates and the sphere radius is stored as fourth float value 3 SHORT_XYZ 3*2=6 For each vertex, the position is stored as unsigned int 16 bit value, quantized to the rande [0.. 65535]. The color data type is one of the following values: Value Color Data Type Bytes per Particle Description 0 NONE 0 No color data is stored 1 UINT8_RGB 3 For each vertex, the color is stored as three unsigned bytes RGB color components 2 UINT8_RGBA 4 For each vertex, the color is stored as four unsigned bytes RGBA color components 3 FLOAT_I 4 For each vertex, the color is stored as one float intensity value. 4 FLOAT_RGB 3*4=12 For each vertex, the color is stored as three float RGB color components 5 FLOAT_RGBA 4*4=16 For each vertex, the color is stored as four float RGBA color components If the vertex data type is FLOAT_XYZ or SHORT_XYZ, the global radius is stored as float. Otherwise this value is omitted. This value is used as radius for all particles. If the color data type is NONE the global color is specified as four unsigned byte values RGBA color components to be used for all particles in this list (cf. color data type UINT8_RGBA). If the color data type is FLOAT_I two float values are stored, specifying the minimum and maximum intensity values used in this particle list. The float color values of all particles must be inside this interval. For all other color data type these values are omitted. The particle count is specified as unsigned int 64 bit. It is safe to use the value 0 here, regardless of the specified vertex data type and color data type. If the vertex data type is NONE, then the particle count must be zero and no particle data follows, regardless of the specified color data type. Otherwise particle data is now written to the file as one block of interleaved data. All components of the particles are interleaved, position and color data (cf. array of structures). For example, for vertex data type FLOAT_XYZ and color data type UINT8_RGB, 15 bytes are written for each particle: Byte 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 Data X1 Y1 Z1 R1 G1 B1 X2 Y2 3

The length of this particle data is specified by the values given above. However, a reader must not read beyond the frame data end specified in the seek table. If the frame data is not long enough the data must be considered corrupted. Any trailing data within the frame data block must be ignored. MMPLD Version 1.1 Extensions This section only describes the extensions of MMPLD version 1.1 to version 1.0. The file format version 1.1 is not an improvement over version 1.0 but a very application specific extension. Usually, the file format version 1.0 is used. In the header data, the version number must be 101. After the particle data, additional cluster data is written for each particle list in each particle frame. First, one unsigned int 32 bit value specifies the number of clusters stored. This can be zero. A second value of type size_t 2 specifies the overall cluster data size in bytes for this particle list and time frame. Then the specified number of bytes are stored, to be interpreted as implementation dependent cluster information. 2 http://www.cplusplus.com/reference/cstddef/size_t/ 4

Appendix A Example Data Conversion Project The following XML project file converts a sequence of multiple IMD atom data files 3 into a single MMPLD file. The required values for the modules need to be specified by a parameter file or corresponding command line arguments (using the option -v). <?xml version="1.0" encoding="utf-8"?> <MegaMol type="project" version="1.0"> <job name="converterjobpldseries" jobmod="job"> <module class="datawriterjob" name="job" /> <module class="mmpldwriter" name="writer" /> <call class="datawriterctrlcall" from="job::writer" to="writer::control" /> <module class="datafilesequence" name="seq"> <param name="filenameslotname" value="data::filename" /> </module> <module class="imdatomdata" name="data"> <param name="radius" value="2"/> </module> <call class="multiparticledatacall" from="writer::data" to="seq::outdata" /> <call class="multiparticledatacall" from="seq::indata" to="data::getdata" /> </job> </MegaMol> Working with other data sources requires simply to replace the module of type IMDAtomData and optionally removing the module DataFileSequence and rerouting the MultiParticleDataCall calls. 3 http://imd.itap.physik.uni-stuttgart.de/userguide/header.html#atomheader 5