Minor changes
This commit is contained in:
@@ -105,6 +105,8 @@ Common.getParamsFromFolders = async function() {
|
||||
* @returns {string[]}
|
||||
*/
|
||||
Common.getImageList = async function (manifestId) {
|
||||
// Regex to exclude images with certain patterns in filename
|
||||
const regexFilter = /(c2r|copertin.|camice|tit)/ig;
|
||||
let folderName = manifestId.replace(/pherc-(\d+)-(\w+)$/, function (_match, g1, g2) {
|
||||
return `PHerc_${g1}_${g2.toUpperCase()}`;
|
||||
});
|
||||
@@ -115,7 +117,7 @@ Common.getImageList = async function (manifestId) {
|
||||
`${process.env.IMAGES_DIR}/${baseFolder}/${folderName}`
|
||||
);
|
||||
|
||||
files = files.filter(file => !/(c2r|copertin.|camice|tit)/.test(file) && !file.startsWith('.'));
|
||||
files = files.filter(file => !regexFilter.test(file) && !file.startsWith('.'));
|
||||
|
||||
return files;
|
||||
}
|
||||
@@ -191,8 +193,9 @@ Common.createCanvas = async function (manifest, filename) {
|
||||
let canvasName = filename.split('_')[namePos[manifest.technique]]
|
||||
.replace(/\.\w{1,3}$/, '');
|
||||
|
||||
let label = canvasName
|
||||
.replace(/c(\w{1,2})0+(\d+).*(\.\w{2,3})?$/i, function (str, c, number) {
|
||||
let label = canvasName.replace(
|
||||
/c(\w{1,2})0+(\d+).*(\.\w{2,3})?$/i,
|
||||
function (str, c, number) {
|
||||
return `C${c}. ${number}`;
|
||||
});
|
||||
// Add PCA to canvas label for HSI images
|
||||
@@ -254,7 +257,6 @@ Common.populateCanvases = async function (manifest, images) {
|
||||
return manifest;
|
||||
}
|
||||
/**
|
||||
* @todo Implement...
|
||||
* @param {Manifest} manifest The Manifest object
|
||||
* @param {string} imgFilename
|
||||
* @returns {ManifestMetadata}
|
||||
|
||||
Reference in New Issue
Block a user