angelolab / MAUI

GUI for low-level analysis of MIBI data
BSD 3-Clause "New" or "Revised" License
4 stars 3 forks source link

Background removal fails with demo data #23

Closed christianrickert closed 3 years ago

christianrickert commented 3 years ago

Hello, I've started testing MAUI because it would be a very useful tool for our lab. Unfortunately, MAUI fails to perform the background removal with the demo data.

Steps to reproduce - based on the MIBI_GUI_notes:

  1. Add point ./MAUI/demo_data_extracted/Point2.
  2. Test the default background removal parameters with the Test button.
  3. Evaluate the default background parameters for the CD45 channel with the Evaluate Point button.
  4. Remove the background using the default parameters with the Remove Background button.

At this point, an unlabeled window with a progress bar appears:

ProgressBar

The progress bar fills completely, but the background removal never completes.

MATLAB's Command Window prints multiple warnings during the GUI interaction and finally throws an error during the background removal:

>> background_removal_gui
Warning: Adding json.jar to the dynamic Java class path. This has cleared matlab internal states, such as
global variables, persistent variables, or mex functions. To avoid this, call json.startup before using other
json API functions. See javaaddpath for more information. 
> In json.startup (line 31)
In json.load (line 58)
In json.read (line 20)
In background_removal_gui>background_removal_gui_OpeningFcn (line 69)
In gui_mainfcn (line 220)
In background_removal_gui (line 47) 
Loading folder of TIFF data at C:\Software\MAUI\demo_data\extracted\Point2...
varargin >
    {1×1 Figure}    {'background'}

<
Warning: Error updating Text.

 String scalar or character vector must have valid interpreter syntax:
Background channel - C

demo\_data\extracted\Point2

Warning: An error occurred while drawing the scene: Zero length string passed to TextLayout constructor.
java.lang.IllegalArgumentException: Zero length string passed to TextLayout constructor.

    at java.awt.font.TextLayout.<init>(TextLayout.java:383)

    at com.mathworks.hg.uij.TextRasterizer.getLogicalBounds(TextRasterizer.java:556)

    at com.mathworks.hg.uij.TextBoundsRequestHandler.getTextLogicalBoundsCallback(Native Method)

    at com.mathworks.hg.uij.TextBoundsRequestHandler.access$100(TextBoundsRequestHandler.java:9)

    at
    com.mathworks.hg.uij.TextBoundsRequestHandler$TextExtentsRunnable.run(TextBoundsRequestHandler.java:17)

    at com.mathworks.jmi.AWTUtilities$Invoker$5$1.run(AWTUtilities.java:591)

    at com.mathworks.mvm.context.ThreadContext$1.call(ThreadContext.java:76)

    at com.mathworks.mvm.context.ThreadContext.callWithContext(ThreadContext.java:105)

    at com.mathworks.mvm.context.ThreadContext.runWithContext(ThreadContext.java:73)

    at com.mathworks.mvm.context.MvmContext.runWithContext(MvmContext.java:107)

    at com.mathworks.jmi.AWTUtilities$Invoker$5.runWithOutput(AWTUtilities.java:588)

    at com.mathworks.jmi.AWTUtilities$Invoker$2.watchedRun(AWTUtilities.java:475)

    at com.mathworks.jmi.AWTUtilities$WatchedRunnable.run(AWTUtilities.java:436)

    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)

    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)

    at java.awt.EventQueue.access$500(EventQueue.java:97)

    at java.awt.EventQueue$3.run(EventQueue.java:709)

    at java.awt.EventQueue$3.run(EventQueue.java:703)

    at java.security.AccessController.doPrivileged(Native Method)

    at
    java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)

    at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)

    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)

    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)

    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Warning: Error updating Text.

 String scalar or character vector must have valid interpreter syntax:
Mask: [ demo\_data\extracted\Point2 ] Channel [ C ] Params: [ 1 : 0.2 : 10 : 2 : 10 ]

Warning: Error updating Text.

 String scalar or character vector must have valid interpreter syntax:
Mask: [ demo\_data\extracted\Point2 ] Channel [ C ] Params: [ 1 : 0.2 : 10 : 2 : 10 ]

varargin >
<
varargin >
<
Warning: Error updating Text.

 String scalar or character vector must have valid interpreter syntax:
demo\_data\extracted\Point2
CD45 - before

> In defaulterrorcallback (line 12)
In linkaxes (line 86)
In MIBIevaluateBackgroundParameters (line 29)
In background_removal_gui>evaluate_point_Callback (line 492)
In gui_mainfcn (line 95)
In background_removal_gui (line 47)
In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)background_removal_gui('evaluate_point_Callback',hObject,eventdata,guidata(hObject)) 
Warning: Error updating Text.

 String scalar or character vector must have valid interpreter syntax:
demo\_data\extracted\Point2
CD45 - Params [ 1 : 0.2 : 10 : 2 : 10 ] - after

> In defaulterrorcallback (line 12)
In linkaxes (line 86)
In MIBIevaluateBackgroundParameters (line 29)
In background_removal_gui>evaluate_point_Callback (line 492)
In gui_mainfcn (line 95)
In background_removal_gui (line 47)
In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)background_removal_gui('evaluate_point_Callback',hObject,eventdata,guidata(hObject)) 
Warning: Error updating Text.

 String scalar or character vector must have valid interpreter syntax:
Removing background from demo\_data\extracted\Point2

> In defaulterrorcallback (line 12)
In waitbar (line 124)
In PointManager/save_no_background (line 685)
In background_removal_gui>remove_background_Callback (line 549)
In gui_mainfcn (line 95)
In background_removal_gui (line 47)
In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)background_removal_gui('remove_background_Callback',hObject,eventdata,guidata(hObject)) 
Saving to C:\Software\MAUI\demo_data\no_background\Point2\TIFs
Error using tifflib
Unable to open TIFF file "C:\Software\MAUI\demo_data\no_background\Point2\TIFs\C.tif".

Error in Tiff (line 660)
            obj.FileID = tifflib('open',filename,mode);

Error in saveTIFF_folder (line 4)
        tiff = Tiff([path, filesep, labels{index}, '.tif'], 'w');

Error in Point/save_no_background (line 201)
                saveTIFF_folder(countsNoBg, obj.labels, obj.tags, [new_path, filesep, obj.path_ext]);

Error in PointManager/save_no_background (line 687)
                    point.save_no_background();

Error in background_removal_gui>remove_background_Callback (line 549)
    pipeline_data.points.save_no_background();

Error in gui_mainfcn (line 95)
        feval(varargin{:});

Error in background_removal_gui (line 47)
    gui_mainfcn(gui_State, varargin{:});

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)background_removal_gui('remove_background_Callback',hObject,eventdata,guidata(hObject)) 
Error while evaluating UIControl Callback.

>> 

Software versions:

Not sure what's going wrong...

christianrickert commented 3 years ago

No active development anymore, see:

https://github.com/angelolab/MAUI/issues/3#issuecomment-868856344