New File Formats — GENX

Posted by ADAM Technology on Monday, July 10, 2023

In Build 2135 we have continued the process of developing new file formats for our software – this time adding a file that didn’t exist before: .genx. (See the previous post for details.)

DTM Generator was originally conceived as a tool to batch-process the DTM generation for multiple 3DM Analyst projects. As such, 3DM CalibCam would first create a bunch of .Vwr files and then launch DTM Generator, providing the list of .Vwr files on the commandline.

In this build we have given DTM Generator a file format of its own. This is not only tidier (avoids filling the folder with .Vwr files), it also allows us to record the provenance in a single place.

The intermediate DTMs are also stored in a separate folder with same name as the .genx file plus the suffix “Intermediate DTMs”.

As before, the metadata.json file contains a "provenance" array contains the history of the data:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
    "provenance": [
        {
            "user": "Jason Birch (/* Email address */)",
            "product": "3DM CalibCam 2.6.6 Build 2135",
            "saved": "2024-07-10 14:39:16.2667215 UTC"
        }
    ],
   // Other data
}

After that, it contains the units for the project, followed by an array of images, and an array of pairs to process together:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{
    "provenance": [
        // Provenance data seen before
    ],
    "units": "m",
    "images": [
        {
            "filename": "DSCF5627.JPG",
            "hash": "b6d55929d79bdb604da38504b0ea9a2263e3a0c927ef5e09095782ffb50c6a47",
            "ori_file": "ori_files/DSCF5627.ori"
        },
        {
            "filename": "DSCF5629.JPG",
            "hash": "e7d17fd263055d0d93a6ce0809a4fdc9f9c94ac62138dc6414448ec8becc579e",
            "ori_file": "ori_files/DSCF5629.ori"
        },
        // Other images
    ],
    "pairs": [
        [
            "DSCF5627.JPG",
            "DSCF5629.JPG"
        ],
        // Other pairs
    ]
}

Each image in the array of images has its hash recorded so that DTM Generator can verify that the image it is loading is the same as the image that was originally processed by 3DM CalibCam. It also points to the name of the ori file associated with the image, which is stored in a separate ori_files folder within the .genx archive.

Everything is nicely self-contained, and when DTM Generator generates DTMs, it stores the provenance taken from the .genx file and adds it to the provenance of the individual .dtmx files that it generates.