AlanRace / SpectralAnalysis

Software for the analysis and interactive exploration of spectral imaging data
https://alanrace.github.io/SpectralAnalysis/
Apache License 2.0
29 stars 9 forks source link

[BUG] #48

Open JeremyLilili opened 2 years ago

JeremyLilili commented 2 years ago

Describe the bug Hi Alan: I'm a new user in SpectralAnalysis. After I run the code you provide, I found here comes an error.If possible,could you help me to solve this?

Many Thanks Jeremy

To Reproduce Steps to reproduce the behavior:

  1. Run the code.
  2. Press the ImzML button in Open and choose MouseBrainCerebellum.imzML in the example folder.
  3. See error that shows "Java exception occurred:".

Expected behavior The data should be showed from the viewer.

Screenshots 123

Error using ImzMLParser/parse (line 56) Java exception occurred: java.lang.StringIndexOutOfBoundsException: String index out of range: -1

at java.lang.String.substring(String.java:1967)

at com.alanmrace.jimzmlparser.obo.OBO.<init>(OBO.java:115)

at com.alanmrace.jimzmlparser.obo.OBO.<init>(OBO.java:119)

at com.alanmrace.jimzmlparser.obo.OBO.<init>(OBO.java:119)

at com.alanmrace.jimzmlparser.obo.OBO.loadOntologyFromFile(OBO.java:252)

at com.alanmrace.jimzmlparser.obo.OBO.getOBO(OBO.java:169)

at com.alanmrace.jimzmlparser.parser.ImzMLHandler.parseimzML(ImzMLHandler.java:178)

at com.alanmrace.jimzmlparser.parser.ImzMLHandler.parseimzML(ImzMLHandler.java:156)

at com.alanmrace.jimzmlparser.parser.ImzMLHandler.parseimzML(ImzMLHandler.java:140)

Error in SpectralAnalysisInterface/openFile (line 79) parser.parse();

Error in SpectralAnalysisInterface>@(src,evnt)this.openFile(this.openFileMethods{i}) (line 330) 'Callback', @(src, evnt) this.openFile(this.openFileMethods{i}));

Error while evaluating Menu Callback.

Software version

If using source code, MATLAB version (please complete the following information):

Desktop (please complete the following information):

Additional context

YaqiZhangAngel commented 10 months ago

Hi Jeremy and Alan,

I was using Matlab 2022 and exactly same issue occurred. Just wondering is there any tips or updates on this issue? Thanks for the help!

best