DanuserLab / u-probe

Processing of raw ratiometric biosensor images (for example based on FRET) into fully corrected "ratio maps" or "activation maps" — images showing the localized activation of the biosensor.
https://pubmed.ncbi.nlm.nih.gov/20235099/
GNU General Public License v3.0
6 stars 1 forks source link

Background Mask (Step 5) bugged when using external mask in Segmentation (Step 4) #15

Closed Anakoi closed 5 hours ago

Anakoi commented 6 days ago

I tried to use the external mask generated by ImageJ in the Segmentation step by choosing the External Segmentation option. Every thing before Step 4 runs normally. However, in Background Mask step it gives me error (shown at the end of this communication). The strange thing was that the program let me pass the step 4 once, for completely unknown reasons. Other times I just keep getting the same failures. I attach a test sample here: TestSample.zip

MATLAB Version 9.14.0.2286388 (R2023a) Update 3
MATLAB License Number: 334062
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 19044)
Java VM Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Movie 1 - E:\Pengning\20241115 ChemoG Talin test\test\Results\movieData.mat:

-- Step 5: Background Mask

Intermediate brace '{}' indexing produced a comma-separated list with 0 values, but it must produce a single value when followed by subsequent indexing
operations.

Error in createMovieBackgroundMasks (line 191)
movieData.processes{iP}.outFilePaths(p.ChannelIndex(j)));

Error in Process/run (line 255)
obj.funName_(obj.getOwner(), varargin{:});

Error in packageGUI_RunFcn>userfcn_runProcdfs (line 635)
userData.crtPackage.processes
{procID}.run(); % throws exception

Error in packageGUI_RunFcn>start_processing_movies_in_series (line 221)
userfcn_runProc_dfs(procID, procRun{iMovie}, handles); % user data is retrieved, updated and submitted

Error in packageGUI_RunFcn (line 166)
movieException = start_processing_movies_in_series(movieRun,handles,movieException,procRun);

Error in packageGUI_OpeningFcn>@(hObject,eventdata)packageGUI_RunFcn(hObject,eventdata,guidata(hObject)) (line 432)
set(handles.pushbutton_run, 'Callback', @(hObject,eventdata)packageGUI_RunFcn(hObject,eventdata,guidata(hObject)));
Please verify your settings are correct. Feel free to contact us if you have question regarding this error.

Please help us improve the software by clearly reporting the scenario when this error occurs, and the above error information to us (error information is also displayed in Matlab command line).

For contact information please refer to the following URL:
http://www.utsouthwestern.edu/labs/danuser/software/

Anakoi commented 6 days ago

I also receive a warning in the end in the command window as well. I paste all the displayed messages below:

Saving results... Finished Correcting! Using previously specified correction image directories... The folder E:\Pengning\20241115 ChemoG Talin test\test\Results\BiosensorsPackage\shade_corrected_images\shade_corrected_images_for_channel_1 already existed. Cleaning the folder ... The folder E:\Pengning\20241115 ChemoG Talin test\test\Results\BiosensorsPackage\shade_corrected_images\shade_corrected_images_for_channel_2 already existed. Cleaning the folder ... Starting shade correction... Loading and processing correction image(s)... Applying shade correction to images... Shade correcting channel 1... Correcting images from "E:\Pengning\20241115 ChemoG Talin test\test\Results\BiosensorsPackage\dark_current_corrected_images\dark_current_corrected_images_for_channel_1", resulting images will be stored in "E:\Pengning\20241115 ChemoG Talin test\test\Results\BiosensorsPackage\shade_corrected_images\shade_corrected_images_for_channel_1" Using correction images from E:\Pengning\20241115 ChemoG Talin test\FakeShades Shade correcting channel 2... Correcting images from "E:\Pengning\20241115 ChemoG Talin test\test\Results\BiosensorsPackage\dark_current_corrected_images\dark_current_corrected_images_for_channel_2", resulting images will be stored in "E:\Pengning\20241115 ChemoG Talin test\test\Results\BiosensorsPackage\shade_corrected_images\shade_corrected_images_for_channel_2" Using correction images from E:\Pengning\20241115 ChemoG Talin test\FakeShades Saving results... Finished Correcting! Finished importing external data! Warning: Cannot create background masks because some channels do not have foreground masks! Please segment these channels before creating background masks!

Anakoi commented 5 hours ago

The issue can solved by deleting the results folder. Error may be due to the output Paths of your ExternalSegmentationProcess do not match the input Paths of BackgroundMasksProcess. It seems like the bug happen when u-probe tries to rewrite the results folder.