Commit 32170cc0 authored by Andrew Cohen's avatar Andrew Cohen

don't exit process ron no ui images

parent 6134ef4a
......@@ -158,6 +158,7 @@ ipcMain.on('openFile', (event) => {
})
//Open a directory
// used by import.js from render thread
ipcMain.on('getDir', (event) => {
const {dialog} = require('electron');
const {fs} = require('fs');
......@@ -166,10 +167,9 @@ ipcMain.on('getDir', (event) => {
function (fileNames) {
// fileNames is an array that contains all the selected
if(fileNames === undefined){
console.log('Why')
console.log('no file specified')
}else{
event.sender.send('getDir',fileNames[0]);
console.log('NO')
}
});
})
......
......@@ -168,8 +168,9 @@ function checkImagePaths(bPrompt,lDB,CONSTANTS,leverFile,fnCallback)
// last resort -- ask main thread to put up a dialog so user can tell us where the images are
console.log('CONSTANTS.ui.rootImageFolder not valid: ' + CONSTANTS.ui.rootImageFolder);
if (!bPrompt) {
console.error('CONSTANTS image path not valid -- non-ui mode, failing!');
process.exit(-1);
console.error('CONSTANTS image path not valid -- non-ui mode, going to try not failing...no images to show though!');
// process.exit(-1);
fnCallback();
return;
}
......
......@@ -88,7 +88,7 @@ for ff=1:length(flist)
Import.generateMRvolumes(imData,chunkSize,flist(ff).folder);
else
% untested...
dsPath=fullfile(leverFolder,ds);
dsPath=fullfile(flist(ff).folder,ds);
imd = MicroscopeData.ReadMetadata([dsPath '.json'],false);
[im]=MicroscopeData.ReaderH5('imageData',imd,'prompt',false);
MicroscopeData.WriterJPG(im,'imageData',imd,'path',dsPath)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment