Page 1 of 1

Matlab undefined function bfCheckJavaPath

PostPosted: Wed Aug 28, 2013 2:47 pm
by fordanic
Downloaded both loci_tools.jar and bfopen.m and placed them in the same folder. Changed directory to that folder and also added loci_tools.jar to the java path.

When I call bfopen, I receive the following error message:

Undefined function 'bfCheckJavaPath' for input arguments of type 'double'.

Error in bfopen (line 98)
status = bfCheckJavaPath(autoloadBioFormats);

However, it is possible for me to run subsequent commands such as:
loci.common.DebugTools.enableLogging('INFO');

Running win 7 x64 and Matlab 2013a.

Any suggestions for how to resolve this matter?

Re: Matlab undefined function bfCheckJavaPath

PostPosted: Thu Aug 29, 2013 7:47 am
by sbesson
Hi,

with the most recent versions of Bio-Formats, a couple of M-files are now required to run properly. For Bio-Formats 4.4.8, the set of M-files is available as a bundle at http://cvs.openmicroscopy.org.uk/snapsh ... matlab.zip.

In the next release, we will expose this Matlab bundle in the main Bio-Formats downloads page and update the corresponding documentation page accordingly.

Answering your second question, you should be able to set the debug level as follows:

Code: Select all
bfCheckJavaPath(); % Add loci_tools.jar to the Matlab classpath
loci.common.DebugTools.enableLogging('INFO'); % Set your debug level
bfopen('/path/to/your/file'); % Open a file


Cheers,
Sebastien

Re: Matlab undefined function bfCheckJavaPath

PostPosted: Thu Aug 29, 2013 8:05 am
by fordanic
Ok, much better now.

Would recommend though to write something about this in the documentation.

Cheers,
Daniel

Re: Matlab undefined function bfCheckJavaPath

PostPosted: Fri Aug 30, 2013 4:04 pm
by sbesson
HI Daniel,

we just updated the Bio-Formats documentation including the Matlab documentation pages. The user page should now mention downloading the M-files instead of the single bfopen:
https://www.openmicroscopy.org/site/sup ... index.html
and the developers page should describe the usage of some of the new function in more details:
https://www.openmicroscopy.org/site/sup ... b-dev.html

As I said, for the next release we will expose the Bio-Formats Matlab files on the downloads page and fix the documentation accordingly.

Thanks for bringing this up,
Sebastien

Re: Matlab undefined function bfCheckJavaPath

PostPosted: Fri Aug 30, 2013 4:56 pm
by fordanic
Thank you so much for your help.

Best,
Daniel

Re: Matlab undefined function bfCheckJavaPath

PostPosted: Wed Jul 30, 2014 8:28 pm
by RJG
Hi,

I just downloaded the bfmatlab package. I copied the entire folder into my currently folder in MatLab, however I am still running into the problem that Daniel describes:

Undefined function 'bfCheckJavaPath' for input arguments of type 'double'.
Error in bfopen (line99)
status=bfCheckJavaPath(autoloadBioFormats).

Any suggestions to fix this? I am trying to load an Nd2 file.

Thank you,
Roxanne

Re: Matlab undefined function bfCheckJavaPath

PostPosted: Thu Jul 31, 2014 7:40 am
by sbesson
Hi Roxanne,

which Bio-Formats MATLAB did you download? The error you posted below is typically a PATH error, i.e. the function cannot be found. From the command prompt, the following command should return a 'not found' message

Code: Select all
>> which bfCheckJavaPath


Are you working exactly from the unzipped bfmatlab folder. There are minimally two ways to use the functions:
- either work from the same folder as the functions so that they can be found
- or add the bfmatlab folder yo your MATLAB PATH so that you can use it from any folder on your system.

Let me know if any of these soutions solves your issue,
Sebastien