Page 1 of 1

Matlab parfor error

PostPosted: Sat Jan 28, 2017 2:23 am
by nhuebsch
I saw someone else had a problem incorporating Bioformats functions with parfor loops in Matlab. Not sure if this is solveable but I hope so. I am running a code that processes stacks two images at a time to look at movements. I can use parfor loops if I first load the entire stack of images into ram with bfGetplane. However, if I try to use bfGetplane within a parfor loop, I get this error:

Error using bfGetPlane (line 49)
The value of 'r' is invalid. It must satisfy the function: @(x)isa(x,'loci.formats.IFormatReader')&&~isempty(x.getCurrentFile()).

when the command is : " I = bfGetPlane(reader,i)" (i) = the "ith" plane.

Is there a solution to this issue, or can you recommend a work-around that doesn't involve keeping the entire image series in active RAM?

thanks.

Re: Matlab parfor error

PostPosted: Sun Jan 29, 2017 1:45 pm
by sbesson