We're Hiring!

Matlab undefined function bfCheckJavaPath

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

Matlab undefined function bfCheckJavaPath

Postby fordanic » Wed Aug 28, 2013 2:47 pm

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?
fordanic
 
Posts: 6
Joined: Wed Aug 28, 2013 2:42 pm

Re: Matlab undefined function bfCheckJavaPath

Postby sbesson » Thu Aug 29, 2013 7:47 am

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
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Matlab undefined function bfCheckJavaPath

Postby fordanic » Thu Aug 29, 2013 8:05 am

Ok, much better now.

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

Cheers,
Daniel
fordanic
 
Posts: 6
Joined: Wed Aug 28, 2013 2:42 pm

Re: Matlab undefined function bfCheckJavaPath

Postby sbesson » Fri Aug 30, 2013 4:04 pm

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
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Matlab undefined function bfCheckJavaPath

Postby fordanic » Fri Aug 30, 2013 4:56 pm

Thank you so much for your help.

Best,
Daniel
fordanic
 
Posts: 6
Joined: Wed Aug 28, 2013 2:42 pm

Re: Matlab undefined function bfCheckJavaPath

Postby RJG » Wed Jul 30, 2014 8:28 pm

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
RJG
 
Posts: 1
Joined: Wed Jul 30, 2014 7:46 pm

Re: Matlab undefined function bfCheckJavaPath

Postby sbesson » Thu Jul 31, 2014 7:40 am

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
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm


Return to User Discussion [Legacy]

Who is online

Users browsing this forum: Google [Bot] and 1 guest