We now describe a Cinema \Current Databse schema as a JSON file schema developed to hold the metadata for a cinema database. The JSON file serves to impose structure on the collection of results.

\subsection{Header Information}
                    
This is required database header information, and values must be as defined below.

\begin{verbatim}
"type" : composite,
"version" : "0.0",
"metadata": {
    "type": "composite-image-stack",
    "store_type": <one of ["FS" or "SFS"]>
},
\end{verbatim}

\subsection{name\_pattern}

For FileStore type databases, this string maps parameter values to filenames for samples. It must be a path relative to the location of the <database>.json file.

\begin{verbatim}
"name_pattern" : <valid file path with substitutions>                   
Ex: "name_pattern" = "{time}/{phi}/{theta}/image.png" (several subdirectories)
    "name_pattern" = "{time}_{phi}_{theta}_image.png" (all images in one directory)
\end{verbatim}

The filename extension (.png, .jpg, etc) determines the default type of data of items held in the store. Items in the store with an argument that has a "types" entry ignore the extension and use their own. For example a 'depth' type image is not well suited to a '.png' file, so for depth images cinema is free to use a different format, such as '.im'.

Because of the nature of parameter relationships, the pattern is only unique up to the point of constrained arguments. For constrained arguments the actual file path begins with that described in the name\_pattern string. Directory and filenames for dependent parameters are then appended using the convention of "name=value/" directory names.

\subsection{arguments and associations}
                    
The rest of the file defines the visualization parameters. Here we define the set of parameters, or 'arguments' and the set of valid values for each one. Arguments have the following form:
                
\subsubsection{arguments}

\begin{verbatim}
<string>: {
    "default": <value>,
    "label": <string>,
    "type": <one of ["range", "list", “option”]>,
    "values": [ list of unique values ],
    <optionally “types”: [ list of one of [“rgb”, “depth”] for each value] >
} 
\end{verbatim}

The types entry defines what image constituent the resulting sample is.

\subsubsection{associations}
\begin{verbatim}
<name1> : {
    <name2> : [list of permissible values for name2 that enable name1], 
}
\end{verbatim}
