Skip to content
Snippets Groups Projects
Commit d16b8c6c authored by Stéphane  DALLONGEVILLE's avatar Stéphane DALLONGEVILLE
Browse files

minors fixes

parent 5d63d426
No related branches found
No related tags found
No related merge requests found
......@@ -100,6 +100,11 @@ public class MatlabXServerDeamon extends Plugin implements MatlabInterpreter
newErr.setStackTrace(err.getStackTrace());
throw newErr;
}
catch(InterruptedException err) {
MatlabCommandException newErr = new MatlabCommandException(err);
newErr.setStackTrace(err.getStackTrace());
throw newErr;
}
}
/**
......@@ -413,9 +418,11 @@ public class MatlabXServerDeamon extends Plugin implements MatlabInterpreter
/**
* Let the user draw a ROI on the given sequence, and return the corresponding mask
* @throws InterruptedException
*/
private void executeROIMask(MatFileReader reader, MatFileWriter writer, MatlabSession session)
throws IOException, InterruptedException {
throws IOException, InterruptedException
{
Sequence fig = retrieveFigureIndex(session).get(reader.getData("h_fig").getAsInt32());
if(fig==null) {
return;
......@@ -433,16 +440,18 @@ public class MatlabXServerDeamon extends Plugin implements MatlabInterpreter
/**
* Convert a pair ROI+sequence into a Matlab boolean mask
* @throws InterruptedException
*/
private static MLArrays.Logical convertToMatlabBooleanMask(String name, Sequence seq, ROI roi)
throws MLIOException, InterruptedException {
throws MLIOException, InterruptedException
{
// Return an empty array if no ROI is given
if(roi==null) {
return new MLArrays.Logical(name, new boolean[0]);
}
// Extract the boolean mask (in Icy's format)
boolean[] mask = ((ROI2D)roi).getBooleanMask(seq.getBounds());
boolean[] mask = ((ROI2D)roi).getBooleanMask(seq.getBounds2D(), false);
// Convert the Icy boolean mask into a Matlab boolean mask (i.e. essentially
// swap the X and Y dimensions)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment