Refine image exclusion filter (common)
This commit is contained in:
@@ -9,15 +9,6 @@ import Image from './Image.js';
|
|||||||
import ManifestMetadata from './Metadata.js';
|
import ManifestMetadata from './Metadata.js';
|
||||||
const Common = {};
|
const Common = {};
|
||||||
|
|
||||||
const TECH_NAMES = {
|
|
||||||
dn: "Disegni Napoletani",
|
|
||||||
do: "Disegni Oxoniensi",
|
|
||||||
nir: "Near Infrared Imaging 1000nm",
|
|
||||||
hsi: "SWIR Hyperspectral Imaging",
|
|
||||||
uvf: "Technical Photography UVF",
|
|
||||||
mbi: "Multispectral Imaging",
|
|
||||||
hiroxnir: "HIROX Near Infrared",
|
|
||||||
}
|
|
||||||
const authors = {
|
const authors = {
|
||||||
DAN: 'Danilo P. Pavone',
|
DAN: 'Danilo P. Pavone',
|
||||||
AUR: 'Aurélie Tournié',
|
AUR: 'Aurélie Tournié',
|
||||||
@@ -70,7 +61,16 @@ function extractDOMetadata(imgFilename) {
|
|||||||
copyright: "The Bodleian Libraries, University of Oxford",
|
copyright: "The Bodleian Libraries, University of Oxford",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Common.TECH_NAMES = TECH_NAMES;
|
|
||||||
|
Common.TECH_NAMES = {
|
||||||
|
dn: "Disegni Napoletani",
|
||||||
|
do: "Disegni Oxoniensi",
|
||||||
|
nir: "Near Infrared Imaging 1000nm",
|
||||||
|
hsi: "SWIR Hyperspectral Imaging",
|
||||||
|
uvf: "Technical Photography UVF",
|
||||||
|
mbi: "Multispectral Imaging",
|
||||||
|
hiroxnir: "HIROX Near Infrared",
|
||||||
|
};
|
||||||
/**
|
/**
|
||||||
* Retrieves available image techniques
|
* Retrieves available image techniques
|
||||||
* for all papyruses based on folder contents
|
* for all papyruses based on folder contents
|
||||||
@@ -115,7 +115,7 @@ Common.getImageList = async function (manifestId) {
|
|||||||
`${process.env.IMAGES_DIR}/${baseFolder}/${folderName}`
|
`${process.env.IMAGES_DIR}/${baseFolder}/${folderName}`
|
||||||
);
|
);
|
||||||
|
|
||||||
files = files.filter(file => !/(c2r|copertina|camice|tit)/.test(file) && !file.startsWith('.'));
|
files = files.filter(file => !/(c2r|copertin.|camice|tit)/.test(file) && !file.startsWith('.'));
|
||||||
|
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
@@ -261,7 +261,7 @@ Common.populateCanvases = async function (manifest, images) {
|
|||||||
*/
|
*/
|
||||||
Common.createMetadata = function (manifest, imgFilename) {
|
Common.createMetadata = function (manifest, imgFilename) {
|
||||||
let metadata = this.getMetadataFromImgName(imgFilename, manifest.technique);
|
let metadata = this.getMetadataFromImgName(imgFilename, manifest.technique);
|
||||||
metadata.technique = TECH_NAMES[manifest.technique];
|
metadata.technique = Common.TECH_NAMES[manifest.technique];
|
||||||
|
|
||||||
return new ManifestMetadata(metadata);
|
return new ManifestMetadata(metadata);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user