[ome-users] Antwort: Re: no matching signature found for class'loci.formats.FormatTools'.

Matthias Pospiech matthias.pospiech at zeiss.com
Fri Aug 23 07:41:58 BST 2013


Sebastien Besson <s.besson at dundee.ac.uk> schrieb am 22.08.2013 17:51:51:

> Von: Sebastien Besson <s.besson at dundee.ac.uk>
> 
> Hi Mathias, 
> 
> Assuming you are using 4.4.8 version (returned by 
> loci.formats.FormatTools.VERSION), this may be bug.

Actually I was using 4.4.6 although I downloaded it yesterday.
I downloaded 4.4.8 and could not reproduce the error. This was 
however with a different image, so that it is not exactly the same
test.

> How did you get this error: did you use one bfopen on an image or a 
> custom script? What type of file are you using?

The file tye is czi. The script that I am using is a stripped bfopen, for 
retrieving the number of images in the file.
If there is an easier way to get the image count I would like to know.

In the end this number is used to read the stack (could be multiple GB) in 

parts of 200 images.

function [ result ] = bfGetNumberOfImages( id )
% Modified bfopen by Matthias Pospiech (Zeiss Microscopy)
%
% There are advantages to using the static approach over javaaddpath:
%     1. If you use bfopen within a loop, it saves on overhead
%        to avoid calling the javaaddpath command repeatedly.
%     2. Calling 'javaaddpath' may erase certain global parameters.
autoloadBioFormats = 1;
 
% Toggle the stitchFiles flag to control grouping of similarly
% named files into a single dataset based on file numbering.
stitchFiles = 0;
 
% To work with compressed Evotec Flex, fill in your LuraWave license code.
%lurawaveLicense = 'xxxxxx-xxxxxxx';
 
% -- Main function - no need to edit anything past this point --
 
% load the Bio-Formats library into the MATLAB environment
status = bfCheckJavaPath(autoloadBioFormats);
assert(status, ['Missing Bio-Formats library. Either add loci_tools.jar '
...
    'to the static Java path or add it to the Matlab path.']);
 
% Prompt for a file if not input
if nargin == 0 || exist(id, 'file') == 0
  [file, path] = uigetfile(bfGetFileExtensions, 'Choose a file to open');
  id = [path file];
  if isequal(path, 0) || isequal(file, 0), return; end
end
 
% initialize logging
loci.common.DebugTools.enableLogging('OFF'); % INFO
 
% Get the channel filler
r = bfGetReader(id, stitchFiles);
 
% Test plane size
if nargin >=4
    planeSize = loci.formats.FormatTools.getPlaneSize(r, varargin{3}, 
varargin{4});
else
    planeSize = loci.formats.FormatTools.getPlaneSize(r);
end
 
if planeSize/(1024)^3 >= 2,
    error(['Image plane too large. Only 2GB of data can be extracted '...
        'at one time. You can workaround the problem by opening '...
        'the plane in tiles.']);
end
 
numSeries = r.getSeriesCount();
result = cell(numSeries, 1);
for s = numSeries
    fprintf('Reading series #%d', s);
    r.setSeries(s - 1);
    numImages = r.getImageCount();
 
    % save images and metadata into our master series list
    result{s} = numImages;
end
r.close();


Matthias Pospiech



---------------------------------------- 
This message is intended for a particular addressee only and may contain business or company secrets. If you have received this email in error, please contact the sender and delete the message immediately. Any use of this email, including saving, publishing, copying, replication or forwarding of the message or the contents is not permitted.  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20130823/8a935650/attachment.html>


More information about the ome-users mailing list