Error Loading only some tif movies

Hi,

Great program by the way! I’ve encountered a weird problem where certain tif movies result in a error: “Exception in thread “Thread-0” java.lang.IllegalArgumentException: Negative position”.

I’m posting the complete output below:

WARNING:root:Distributed support disabled: please install nuageux
INFO:root:Version: 2012-11-05T12:52:54 SVN:9967 / 20121105125254
Version: 2012-11-05T12:52:54 SVN:9967 / 20121105125254
INFO:PipelineStatistics:Pipeline saved with CellProfiler version 11710
Pipeline saved with CellProfiler version 11710
/usr/lib/python2.6/dist-packages/pytz/init.py:32: UserWarning: Module decorator was already imported from /opt/CellProfiler-2/decorator.pyc, but /usr/local/lib/python2.6/dist-packages/decorator-3.3.1-py2.6.egg is being added to sys.path
from pkg_resources import resource_stream
Exception in thread “Thread-0” java.lang.IllegalArgumentException: Negative position
at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:600)
at loci.common.NIOByteBufferProvider.allocateDirect(NIOByteBufferProvider.java:120)
at loci.common.NIOByteBufferProvider.allocate(NIOByteBufferProvider.java:105)
at loci.common.NIOFileHandle.buffer(NIOFileHandle.java:482)
at loci.common.NIOFileHandle.seek(NIOFileHandle.java:204)
at loci.common.RandomAccessInputStream.seek(RandomAccessInputStream.java:104)
at loci.formats.in.SISReader.initStandardMetadata(SISReader.java:154)
at loci.formats.in.BaseTiffReader.initMetadata(BaseTiffReader.java:82)
at loci.formats.in.BaseTiffReader.initFile(BaseTiffReader.java:499)
at loci.formats.FormatReader.setId(FormatReader.java:1072)
at loci.formats.ImageReader.setId(ImageReader.java:670)
ERROR:root:Failed to prepare run for module LoadImages
Traceback (most recent call last):
File “/opt/CellProfiler-2/cellprofiler/pipeline.py”, line 1494, in prepare_run
if not module.prepare_run(workspace):
File “/opt/CellProfiler-2/cellprofiler/modules/loadimages.py”, line 1460, in prepare_run
return self.prepare_run_of_flex(workspace)
File “/opt/CellProfiler-2/cellprofiler/modules/loadimages.py”, line 1836, in prepare_run_of_flex
rdr.setId(pathname)
File “/opt/CellProfiler-2/cellprofiler/utilities/jutil.py”, line 502, in method
return call(self.o, name, sig, *args)
File “/opt/CellProfiler-2/cellprofiler/utilities/jutil.py”, line 440, in call
raise JavaException(x)
JavaException: Negative position
Failed to prepare run for module LoadImages
Traceback (most recent call last):
File “/opt/CellProfiler-2/cellprofiler/pipeline.py”, line 1494, in prepare_run
if not module.prepare_run(workspace):
File “/opt/CellProfiler-2/cellprofiler/modules/loadimages.py”, line 1460, in prepare_run
return self.prepare_run_of_flex(workspace)
File “/opt/CellProfiler-2/cellprofiler/modules/loadimages.py”, line 1836, in prepare_run_of_flex
rdr.setId(pathname)
File “/opt/CellProfiler-2/cellprofiler/utilities/jutil.py”, line 502, in method
return call(self.o, name, sig, *args)
File “/opt/CellProfiler-2/cellprofiler/utilities/jutil.py”, line 440, in call
raise JavaException(x)
JavaException: Negative position

Hi,
Would you be able to post an example TIF for which this error occurs?
Thanks!
-Mark

Sure, I have the link below to the file in my Google Drive. Its a pretty big file… >500 mb.

https://docs.google.com/open?id=0Bzb-U9Xxn0IKd09vczFDcW56emc

Hi,

We’ve taken a look at the file. There is a solution to handling the file it but it’s risky :smile:

The current CellProfiler code (both the release and the code we have been continuing to develop in the same vein), doesn’t do a good job at handling TIF and FLEX files with multiple series. We have been working on a new interface to CellProfiler which incorporates some changes on how files are read, including these type of files, but it’s highly experimental. Still, you can give it a try.

First, go to this page and read the caveats on that page. Then follow the “Trunk builds for CellProfiler” link and select the appropriate build from below the horizontal line to download the file and install it.

I’m attaching the pipeline that I made with this build to get you started. To use it, do the following:

  • Load the pipeline by going to File > Load pipeline…
    , and select “Load pipeline” from the dialog box. - Images module: To begin, you need to drag/drop the FLEX file into the blank space.

  • Metadata module: Press the “Update metadata” button so that CP can determine how the channels are laid out in each file. You can then press the “Show table” button to see how the information is laid out; each planar image in the FLEX file will have attached metadata.

  • NamesAndTypes: You can then define channels based on the channel name.In this case, it seems like there’s just one channel.

At this point, the FLEX file is prepared and can correctly process the result further into the pipeline. You can add the usual modules into the rest of the pipeline; I added IdentifyPrimary just as an example.

Regards,
-Mark
2012_12_14.cp (13.8 KB)