OpenAPI: Add integrated NXmx file writer format
This commit is contained in:
@@ -795,7 +795,7 @@ org::openapitools::server::model::File_writer_format Convert(FileWriterFormat in
|
||||
org::openapitools::server::model::File_writer_format ret;
|
||||
switch (input) {
|
||||
case FileWriterFormat::DataOnly:
|
||||
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::NONE);
|
||||
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXONLYDATA);
|
||||
break;
|
||||
case FileWriterFormat::NXmxLegacy:
|
||||
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXLEGACY);
|
||||
@@ -803,6 +803,9 @@ org::openapitools::server::model::File_writer_format Convert(FileWriterFormat in
|
||||
case FileWriterFormat::NXmxVDS:
|
||||
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXVDS);
|
||||
break;
|
||||
case FileWriterFormat::NXmxIntegrated:
|
||||
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXINTEGRATED);
|
||||
break;
|
||||
case FileWriterFormat::CBF:
|
||||
ret.setValue(org::openapitools::server::model::File_writer_format::eFile_writer_format::CBF);
|
||||
break;
|
||||
@@ -820,12 +823,14 @@ org::openapitools::server::model::File_writer_format Convert(FileWriterFormat in
|
||||
|
||||
FileWriterFormat Convert(const org::openapitools::server::model::File_writer_format& input) {
|
||||
switch (input.getValue()) {
|
||||
case org::openapitools::server::model::File_writer_format::eFile_writer_format::NONE:
|
||||
case org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXONLYDATA:
|
||||
return FileWriterFormat::DataOnly;
|
||||
case org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXLEGACY:
|
||||
return FileWriterFormat::NXmxLegacy;
|
||||
case org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXVDS:
|
||||
return FileWriterFormat::NXmxVDS;
|
||||
case org::openapitools::server::model::File_writer_format::eFile_writer_format::NXMXINTEGRATED:
|
||||
return FileWriterFormat::NXmxIntegrated;
|
||||
case org::openapitools::server::model::File_writer_format::eFile_writer_format::CBF:
|
||||
return FileWriterFormat::CBF;
|
||||
case org::openapitools::server::model::File_writer_format::eFile_writer_format::TIFF:
|
||||
|
||||
@@ -75,8 +75,8 @@ void to_json(nlohmann::json& j, const File_writer_format& o)
|
||||
case File_writer_format::eFile_writer_format::INVALID_VALUE_OPENAPI_GENERATED:
|
||||
j = "INVALID_VALUE_OPENAPI_GENERATED";
|
||||
break;
|
||||
case File_writer_format::eFile_writer_format::NONE:
|
||||
j = "None";
|
||||
case File_writer_format::eFile_writer_format::NXMXONLYDATA:
|
||||
j = "NXmxOnlyData";
|
||||
break;
|
||||
case File_writer_format::eFile_writer_format::NXMXLEGACY:
|
||||
j = "NXmxLegacy";
|
||||
@@ -84,6 +84,9 @@ void to_json(nlohmann::json& j, const File_writer_format& o)
|
||||
case File_writer_format::eFile_writer_format::NXMXVDS:
|
||||
j = "NXmxVDS";
|
||||
break;
|
||||
case File_writer_format::eFile_writer_format::NXMXINTEGRATED:
|
||||
j = "NXmxIntegrated";
|
||||
break;
|
||||
case File_writer_format::eFile_writer_format::CBF:
|
||||
j = "CBF";
|
||||
break;
|
||||
@@ -100,8 +103,8 @@ void from_json(const nlohmann::json& j, File_writer_format& o)
|
||||
{
|
||||
|
||||
auto s = j.get<std::string>();
|
||||
if (s == "None") {
|
||||
o.setValue(File_writer_format::eFile_writer_format::NONE);
|
||||
if (s == "NXmxOnlyData") {
|
||||
o.setValue(File_writer_format::eFile_writer_format::NXMXONLYDATA);
|
||||
}
|
||||
else if (s == "NXmxLegacy") {
|
||||
o.setValue(File_writer_format::eFile_writer_format::NXMXLEGACY);
|
||||
@@ -109,6 +112,9 @@ void from_json(const nlohmann::json& j, File_writer_format& o)
|
||||
else if (s == "NXmxVDS") {
|
||||
o.setValue(File_writer_format::eFile_writer_format::NXMXVDS);
|
||||
}
|
||||
else if (s == "NXmxIntegrated") {
|
||||
o.setValue(File_writer_format::eFile_writer_format::NXMXINTEGRATED);
|
||||
}
|
||||
else if (s == "CBF") {
|
||||
o.setValue(File_writer_format::eFile_writer_format::CBF);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/*
|
||||
* File_writer_format.h
|
||||
*
|
||||
* None - no master file written NXmxLegacy - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia NXmxVDS - newer format with virtual dataset linking data files in the master file, also includes better metadata handling
|
||||
* NoFileWritten - no files are written at all NXmxOnlyData - only data files are written, no master file NXmxLegacy - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia NXmxVDS - newer format with virtual dataset linking data files in the master file, also includes better metadata handling NXmxIntegrated - single HDF5 per dataset CBF - CBF format (limited metadata) TIFF - TIFF format (no metadata)
|
||||
*/
|
||||
|
||||
#ifndef File_writer_format_H_
|
||||
@@ -25,7 +25,7 @@ namespace org::openapitools::server::model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// None - no master file written NXmxLegacy - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia NXmxVDS - newer format with virtual dataset linking data files in the master file, also includes better metadata handling
|
||||
/// NoFileWritten - no files are written at all NXmxOnlyData - only data files are written, no master file NXmxLegacy - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia NXmxVDS - newer format with virtual dataset linking data files in the master file, also includes better metadata handling NXmxIntegrated - single HDF5 per dataset CBF - CBF format (limited metadata) TIFF - TIFF format (no metadata)
|
||||
/// </summary>
|
||||
class File_writer_format
|
||||
{
|
||||
@@ -38,9 +38,10 @@ public:
|
||||
// Avoiding name clashes with user defined
|
||||
// enum values
|
||||
INVALID_VALUE_OPENAPI_GENERATED = 0,
|
||||
NONE,
|
||||
NXMXONLYDATA,
|
||||
NXMXLEGACY,
|
||||
NXMXVDS,
|
||||
NXMXINTEGRATED,
|
||||
CBF,
|
||||
TIFF,
|
||||
NOFILEWRITTEN
|
||||
|
||||
@@ -642,17 +642,22 @@ components:
|
||||
file_writer_format:
|
||||
type: string
|
||||
enum:
|
||||
- "None"
|
||||
- "NXmxOnlyData"
|
||||
- "NXmxLegacy"
|
||||
- "NXmxVDS"
|
||||
- "NXmxIntegrated"
|
||||
- "CBF"
|
||||
- "TIFF"
|
||||
- "NoFileWritten"
|
||||
default: "NXmxLegacy"
|
||||
description: |
|
||||
None - no master file written
|
||||
NoFileWritten - no files are written at all
|
||||
NXmxOnlyData - only data files are written, no master file
|
||||
NXmxLegacy - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia
|
||||
NXmxVDS - newer format with virtual dataset linking data files in the master file, also includes better metadata handling
|
||||
NXmxIntegrated - single HDF5 per dataset
|
||||
CBF - CBF format (limited metadata)
|
||||
TIFF - TIFF format (no metadata)
|
||||
file_writer_settings:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -33,7 +33,7 @@ enum class FileWriterFormat : int {
|
||||
DataOnly = 0,
|
||||
NXmxLegacy = 1,
|
||||
NXmxVDS = 2,
|
||||
// TODO: NXmxTR = 3
|
||||
NXmxIntegrated = 3,
|
||||
CBF = 4,
|
||||
TIFF = 5,
|
||||
NoFile = 6
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
# FileWriterFormat
|
||||
|
||||
None - no master file written NXmxLegacy - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia NXmxVDS - newer format with virtual dataset linking data files in the master file, also includes better metadata handling
|
||||
NoFileWritten - no files are written at all NXmxOnlyData - only data files are written, no master file NXmxLegacy - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia NXmxVDS - newer format with virtual dataset linking data files in the master file, also includes better metadata handling NXmxIntegrated - single HDF5 per dataset CBF - CBF format (limited metadata) TIFF - TIFF format (no metadata)
|
||||
|
||||
## Enum
|
||||
|
||||
* `NONE` (value: `'None'`)
|
||||
* `NXMXONLYDATA` (value: `'NXmxOnlyData'`)
|
||||
|
||||
* `NXMXLEGACY` (value: `'NXmxLegacy'`)
|
||||
|
||||
* `NXMXVDS` (value: `'NXmxVDS'`)
|
||||
|
||||
* `NXMXINTEGRATED` (value: `'NXmxIntegrated'`)
|
||||
|
||||
* `CBF` (value: `'CBF'`)
|
||||
|
||||
* `TIFF` (value: `'TIFF'`)
|
||||
|
||||
@@ -30,8 +30,8 @@ function stringToEnum(value: string): file_writer_format {
|
||||
(v) => v === value
|
||||
) as file_writer_format;
|
||||
|
||||
// If no match is found, default to file_writer_format.NONE
|
||||
return enumValue || file_writer_format.NONE;
|
||||
// If no match is found, default to file_writer_format.NXMX_ONLY_DATA
|
||||
return enumValue || file_writer_format.NXMX_ONLY_DATA;
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,8 @@ class FileWriterSettings extends React.Component<MyProps, MyState> {
|
||||
>
|
||||
<MenuItem value={file_writer_format.NXMX_LEGACY}>NXmx HDF5 master file with soft links (DECTRIS file writer compatibility)</MenuItem>
|
||||
<MenuItem value={file_writer_format.NXMX_VDS}>NXmx HDF5 master file with virtual datasets</MenuItem>
|
||||
<MenuItem value={file_writer_format.NONE}>No NXmx HDF5 master file (only data files)</MenuItem>
|
||||
<MenuItem value={file_writer_format.NXMX_INTEGRATED}Single HDF5 file with data and metadata</MenuItem>
|
||||
<MenuItem value={file_writer_format.NXMX_ONLY_DATA}>No NXmx HDF5 master file (only data files)</MenuItem>
|
||||
<MenuItem value={file_writer_format.CBF}>miniCBF (only data files; limited metadata)</MenuItem>
|
||||
<MenuItem value={file_writer_format.TIFF}>TIFF (only data files; no metadata)</MenuItem>
|
||||
<MenuItem value={file_writer_format.NO_FILE_WRITTEN}>No files saved</MenuItem>
|
||||
|
||||
@@ -4,15 +4,20 @@
|
||||
/* eslint-disable */
|
||||
|
||||
/**
|
||||
* None - no master file written
|
||||
* NoFileWritten - no files are written at all
|
||||
* NXmxOnlyData - only data files are written, no master file
|
||||
* NXmxLegacy - legacy format with soft links to data files in the master file; necessary for DECTRIS Albula 4.0 and DECTRIS Neggia
|
||||
* NXmxVDS - newer format with virtual dataset linking data files in the master file, also includes better metadata handling
|
||||
* NXmxIntegrated - single HDF5 per dataset
|
||||
* CBF - CBF format (limited metadata)
|
||||
* TIFF - TIFF format (no metadata)
|
||||
*
|
||||
*/
|
||||
export enum file_writer_format {
|
||||
NONE = 'None',
|
||||
NXMX_ONLY_DATA = 'NXmxOnlyData',
|
||||
NXMX_LEGACY = 'NXmxLegacy',
|
||||
NXMX_VDS = 'NXmxVDS',
|
||||
NXMX_INTEGRATED = 'NXmxIntegrated',
|
||||
CBF = 'CBF',
|
||||
TIFF = 'TIFF',
|
||||
NO_FILE_WRITTEN = 'NoFileWritten',
|
||||
|
||||
Reference in New Issue
Block a user