Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #11330 (closed)

Opened 7 years ago

Closed 7 years ago

Bug: unexpected behavior between mkfake and FakeReader

Reported by: jamoore Owned by: mlinkert
Priority: minor Milestone: OMERO-5
Component: Bio-Formats Version: 5.0.0-beta1
Keywords: n.a. Cc: bpindelski
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description

I created a fake plate and then tried to access it with showinf and got an exception:

...$ ./mkfake -plates 2 -runs 2 -rows 2 -columns 2 /tmp/mf1
...$ find /tmp/mf1.fake/
/tmp/mf1.fake/
/tmp/mf1.fake/Plate000
/tmp/mf1.fake/Plate000/Run001
/tmp/mf1.fake/Plate000/Run001/WellA001
/tmp/mf1.fake/Plate000/Run001/WellA001/Field000.fake
/tmp/mf1.fake/Plate000/Run001/WellB001
/tmp/mf1.fake/Plate000/Run001/WellB001/Field000.fake
/tmp/mf1.fake/Plate000/Run001/WellB000
/tmp/mf1.fake/Plate000/Run001/WellB000/Field000.fake
/tmp/mf1.fake/Plate000/Run001/WellA000
/tmp/mf1.fake/Plate000/Run001/WellA000/Field000.fake
/tmp/mf1.fake/Plate000/Run000
/tmp/mf1.fake/Plate000/Run000/WellA001
/tmp/mf1.fake/Plate000/Run000/WellA001/Field000.fake
/tmp/mf1.fake/Plate000/Run000/WellB001
/tmp/mf1.fake/Plate000/Run000/WellB001/Field000.fake
/tmp/mf1.fake/Plate000/Run000/WellB000
/tmp/mf1.fake/Plate000/Run000/WellB000/Field000.fake
/tmp/mf1.fake/Plate000/Run000/WellA000
/tmp/mf1.fake/Plate000/Run000/WellA000/Field000.fake
/tmp/mf1.fake/Plate001
/tmp/mf1.fake/Plate001/Run001
/tmp/mf1.fake/Plate001/Run001/WellA001
/tmp/mf1.fake/Plate001/Run001/WellA001/Field000.fake
/tmp/mf1.fake/Plate001/Run001/WellB001
/tmp/mf1.fake/Plate001/Run001/WellB001/Field000.fake
/tmp/mf1.fake/Plate001/Run001/WellB000
/tmp/mf1.fake/Plate001/Run001/WellB000/Field000.fake
/tmp/mf1.fake/Plate001/Run001/WellA000
/tmp/mf1.fake/Plate001/Run001/WellA000/Field000.fake
/tmp/mf1.fake/Plate001/Run000
/tmp/mf1.fake/Plate001/Run000/WellA001
/tmp/mf1.fake/Plate001/Run000/WellA001/Field000.fake
/tmp/mf1.fake/Plate001/Run000/WellB001
/tmp/mf1.fake/Plate001/Run000/WellB001/Field000.fake
/tmp/mf1.fake/Plate001/Run000/WellB000
/tmp/mf1.fake/Plate001/Run000/WellB000/Field000.fake
/tmp/mf1.fake/Plate001/Run000/WellA000
/tmp/mf1.fake/Plate001/Run000/WellA000/Field000.fake

...$ ./showinf /tmp/mf1.fake/
Exception in thread "main" java.io.FileNotFoundException: /tmp/mf1.fake (Is a directory)
	at java.io.RandomAccessFile.open(Native Method)
	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:233)
	at ome.scifio.io.NIOFileHandle.<init>(NIOFileHandle.java:130)
	at ome.scifio.io.NIOFileHandle.<init>(NIOFileHandle.java:141)
	at ome.scifio.io.NIOFileHandle.<init>(NIOFileHandle.java:150)
	at ome.scifio.io.Location.getHandle(Location.java:309)
	at ome.scifio.io.Location.getHandle(Location.java:280)
	at ome.scifio.io.Location.getHandle(Location.java:270)
	at ome.scifio.io.Location.checkValidId(Location.java:333)
	at loci.common.Location.checkValidId(Location.java:243)
	at loci.formats.ImageReader.getReader(ImageReader.java:177)
	at loci.formats.ImageReader.getFormat(ImageReader.java:159)
	at loci.formats.tools.ImageInfo.configureReaderPreInit(ImageInfo.java:402)
	at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:1013)
	at loci.formats.tools.ImageInfo.main(ImageInfo.java:1062)

Running showinf on one of the fake files seems to work but doesn't contain a series:

...$ ./showinf /tmp/mf1.fake/Plate001/Run001/WellA000/Field000.fake 
Checking file format [Simulated data]
Initializing reader
FakeReader initializing /tmp/mf1.fake/Plate001/Run001/WellA000/Field000.fake
Initialization took 0.043s

Reading core metadata
Filename = /tmp/mf1.fake/Plate001/Run001/WellA000/Field000.fake
Series count = 1
Series #0 :
	Image count = 1
	RGB = false (1) 
	Interleaved = false
	Indexed = false (true color)
	Width = 512
	Height = 512
	SizeZ = 1
	SizeT = 1
	SizeC = 1
	Thumbnail size = 128 x 128
	Endianness = intel (little)
	Dimension order = XYZCT (certain)
	Pixel type = uint8
	Valid bits per pixel = 8
	Metadata complete = true
	Thumbnail series = false
	-----
	Plane #0 <=> Z 0, C 0, T 0


Reading pixel data (0-0)
	Read 1/1 planes (100%)
[done]
0.07s elapsed (70.0ms per plane)

Launching image viewer

Reading global metadata

Reading metadata

Specifying the format finds a series of 2, but I would have expected more:

...$ ./showinf -format loci.formats.in.FakeReader /tmp/mf1.fake
Unknown reader: loci.formats.in.FakeReader
Checking file format [Simulated data]
Initializing reader
FakeReader initializing /tmp/mf1.fake
Initialization took 0.13s

Reading core metadata
Filename = /tmp/mf1.fake
Used files:
	/tmp/mf1.fake/Plate000/Run001/WellA001/Field000.fake
	/tmp/mf1.fake/Plate000/Run001/WellB001/Field000.fake
	/tmp/mf1.fake/Plate000/Run001/WellB000/Field000.fake
	/tmp/mf1.fake/Plate000/Run001/WellA000/Field000.fake
	/tmp/mf1.fake/Plate000/Run000/WellA001/Field000.fake
	/tmp/mf1.fake/Plate000/Run000/WellB001/Field000.fake
	/tmp/mf1.fake/Plate000/Run000/WellB000/Field000.fake
	/tmp/mf1.fake/Plate000/Run000/WellA000/Field000.fake
	/tmp/mf1.fake/Plate001/Run001/WellA001/Field000.fake
	/tmp/mf1.fake/Plate001/Run001/WellB001/Field000.fake
	/tmp/mf1.fake/Plate001/Run001/WellB000/Field000.fake
	/tmp/mf1.fake/Plate001/Run001/WellA000/Field000.fake
	/tmp/mf1.fake/Plate001/Run000/WellA001/Field000.fake
	/tmp/mf1.fake/Plate001/Run000/WellB001/Field000.fake
	/tmp/mf1.fake/Plate001/Run000/WellB000/Field000.fake
	/tmp/mf1.fake/Plate001/Run000/WellA000/Field000.fake
Series count = 2
Series #0 :
	Image count = 1
	RGB = false (1) 
	Interleaved = false
	Indexed = false (true color)
	Width = 512
	Height = 512
	SizeZ = 1
	SizeT = 1
	SizeC = 1
	Thumbnail size = 128 x 128
	Endianness = intel (little)
	Dimension order = XYZCT (certain)
	Pixel type = uint8
	Valid bits per pixel = 8
	Metadata complete = true
	Thumbnail series = false
	-----
	Plane #0 <=> Z 0, C 0, T 0

Series #1 :
	Image count = 1
	RGB = false (1) 
	Interleaved = false
	Indexed = false (true color)
	Width = 512
	Height = 512
	SizeZ = 1
	SizeT = 1
	SizeC = 1
	Thumbnail size = 128 x 128
	Endianness = intel (little)
	Dimension order = XYZCT (certain)
	Pixel type = uint8
	Valid bits per pixel = 8
	Metadata complete = true
	Thumbnail series = false
	-----
	Plane #0 <=> Z 0, C 0, T 0


Reading series #0 pixel data (0-0)
	Read 1/1 planes (100%)
[done]
0.059s elapsed (59.0ms per plane)

Launching image viewer

Reading global metadata

Reading series #0 metadata

Change History (2)

comment:1 Changed 7 years ago by bpindelski

Tested with HEAD of bioformats/develop. Indeed, specifying the final trailing slash confuses showinf, but that is also the default behaviour when pointing it at any directory (not only one that was created by mkfake).
What should the expected output be with ./showinf /tmp/mf1.fake/Plate001/Run001/WellA000/Field000.fake? I tried showinf on a MIAS .tif file and the output of used files and series isn't clear to me (i.e. used files prints out all the .tif files in all the wells, whereas series count is 16 - much less than the used files count).
Finally - ./showinf -format loci.formats.in.FakeReader /tmp/mf1.fake gives me series count = 16 and all the expected used files.

comment:2 Changed 7 years ago by mlinkert

  • Resolution set to fixed
  • Status changed from new to closed

Fixed with: https://github.com/openmicroscopy/bioformats/pull/756

Note that showinf /tmp/mf1.fake/Plate000/Run000/WellA000/Field000.fake will still only pick up that single file. In my opinion, that's expected behavior, similar to how many formats use TIFF files but calling setId on a TIFF only picks up a single file.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.90769 sec.)

We're Hiring!