NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 450 - Stitching - Visualize Tile Problem
Stitching - Visualize Tile Problem
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Plugins
unspecified
PC Windows
: P2 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2012-07-16 11:04 CDT by Sebastian Rhode
Modified: 2015-06-20 09:37 CDT
2 users (show)

See Also:


Attachments
attach (5.59 KB, text/html)
2015-06-20 09:37 CDT, stiv

Description Sebastian Rhode 2012-07-16 11:04:40 CDT
Hi,

I have a directory, which contains 25 images (tile_0001.tif - tile_0025.tif). The complete tile is 5x5 with 3 color channels. I successfully stitched the images and got the TileConfiguration and TileConfiguration.registered files.

Now I tried the "Visualize Tiles" option and selected the TileConfiguration.registered.txt file and got the following error messages:

java.io.FileNotFoundException: tile_0001.tif (The system cannot find the file specified)
	at java.io.RandomAccessFile.open(Native Method)
	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:114)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:125)
	at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:134)
	at loci.common.Location.getHandle(Location.java:294)
	at loci.common.Location.getHandle(Location.java:265)
	at loci.common.Location.getHandle(Location.java:255)
	at loci.common.RandomAccessInputStream.<init>(RandomAccessInputStream.java:82)
	at loci.formats.tiff.TiffParser.<init>(TiffParser.java:94)
	at loci.plugins.VisualizeTiles.readImageDimensions(VisualizeTiles.java:155)
	at loci.plugins.VisualizeTiles.vizTiles(VisualizeTiles.java:110)
	at loci.plugins.VisualizeTiles.run(VisualizeTiles.java:75)
	at ij.IJ.runUserPlugIn(IJ.java:185)
	at ij.IJ.runPlugIn(IJ.java:152)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at ij.Command.runPlugIn(Command.java:146)
	at ij.Command.runCommand(Command.java:95)
	at ij.Executer.run(Executer.java:64)
	at java.lang.Thread.run(Thread.java:662)


And here are the two files:

TileConfiguration.txt

# Define the number of dimensions we are working on
dim = 2

# Define the image coordinates
tile_0001.tif; ; (0.0, 0.0)
tile_0002.tif; ; (1193.0, 0.0)
tile_0003.tif; ; (2386.0, 0.0)
tile_0004.tif; ; (3579.0, 0.0)
tile_0005.tif; ; (4772.0, 0.0)
tile_0010.tif; ; (0.0, 892.0)
tile_0009.tif; ; (1193.0, 892.0)
tile_0008.tif; ; (2386.0, 892.0)
tile_0007.tif; ; (3579.0, 892.0)
tile_0006.tif; ; (4772.0, 892.0)
tile_0011.tif; ; (0.0, 1784.0)
tile_0012.tif; ; (1193.0, 1784.0)
tile_0013.tif; ; (2386.0, 1784.0)
tile_0014.tif; ; (3579.0, 1784.0)
tile_0015.tif; ; (4772.0, 1784.0)
tile_0020.tif; ; (0.0, 2676.0)
tile_0019.tif; ; (1193.0, 2676.0)
tile_0018.tif; ; (2386.0, 2676.0)
tile_0017.tif; ; (3579.0, 2676.0)
tile_0016.tif; ; (4772.0, 2676.0)
tile_0021.tif; ; (0.0, 3568.0)
tile_0022.tif; ; (1193.0, 3568.0)
tile_0023.tif; ; (2386.0, 3568.0)
tile_0024.tif; ; (3579.0, 3568.0)
tile_0025.tif; ; (4772.0, 3568.0)


TileConfiguration.registered.txt

# Define the number of dimensions we are working on
dim = 2

# Define the image coordinates
tile_0001.tif; ; (0.0, 0.0)
tile_0002.tif; ; (1189.1653, 0.47143364)
tile_0003.tif; ; (2376.6052, 1.8184495)
tile_0004.tif; ; (3570.1814, 4.867719)
tile_0005.tif; ; (4773.105, 6.8730006)
tile_0010.tif; ; (-1.02887, 830.48035)
tile_0009.tif; ; (1186.266, 831.8931)
tile_0008.tif; ; (2374.8462, 834.2234)
tile_0007.tif; ; (3569.0845, 836.96326)
tile_0006.tif; ; (4772.757, 838.31525)
tile_0011.tif; ; (-2.5798795, 1668.7394)
tile_0012.tif; ; (1189.8367, 1669.9478)
tile_0013.tif; ; (2377.585, 1671.9425)
tile_0014.tif; ; (3570.9868, 1673.7147)
tile_0015.tif; ; (4772.3354, 1674.9204)
tile_0020.tif; ; (-3.8837316, 2507.503)
tile_0019.tif; ; (1185.9806, 2508.9976)
tile_0018.tif; ; (2371.6765, 2513.0034)
tile_0017.tif; ; (0.0, 0.0)
tile_0016.tif; ; (4769.5317, 2513.2195)
tile_0021.tif; ; (-2.3837316, 3351.9832)
tile_0022.tif; ; (0.0, 0.0)
tile_0023.tif; ; (2375.8271, 3356.6768)
tile_0024.tif; ; (3569.1956, 3357.582)
tile_0025.tif; ; (4769.0835, 3358.1475)


Cheers,

Sebi
Comment 1 Stephan Preibisch 2012-07-16 15:32:08 CDT
Hi,

I never implemented anything like "visualize tiles", it seems it is rather part of the LOCI Bioformats. I do not understand where you checked the "visualize tiles" in the Stitching, there is also no such parameter anywhere ...

Please provide more details ...

Bye bye,
Stephan
Comment 2 Sebastian Rhode 2012-07-16 15:54:00 CDT
Hi Stephan,

Under Stitching I find "Visualize Tiles". When I press this one a Open File Dialog opens up and asks for a tile configuration file- And here I assumed this would be either the TileConfiguration.txt or the TileConfiguration.registered.txt file.

I also have an "Stitch OME-TIFF" under Stitching, but this one does not work as well ...

Cheers,  Sebi

Comment 3 Stephan Preibisch 2012-07-16 16:21:49 CDT
Hi,

sorry, I do not find it :) Under stitching I find:
 
-MosaicJ (->not mine)
-Pairwise Stitching (mine)
-Grid/Collection Stitching (mine)

That's it ... everything else is something you installed manually as is definitely not from me. Still, I am interested, where exactly do you find this "Visualize tiles"?

Bye bye,
Stephan
Comment 4 Jan Eglinger 2012-07-16 16:27:09 CDT
(In reply to comment #3)
> That's it ... everything else is something you installed manually as is
> definitely not from me. Still, I am interested, where exactly do you find this
> "Visualize tiles"?

I guess you're using the VisualizeTiles.java plugin that is part of the Fiji plugins by LOCI, right?
(see http://trac.imagej.net/ticket/344 )

So it's not part of Fiji itself, but updated automatically by the third-party update site of LOCI: http://dev.loci.wisc.edu/fiji/

Jan
Comment 5 Sebastian Rhode 2012-07-16 16:29:02 CDT
Hi Stephane,

maybe (if you are right) you have to add the following site to your update sites:

http://dev.loci.wisc.edu/fiji/

On my PC "Visualize Tiles" appears under Stitching inside the control panel.

Sebi
Comment 6 Melissa Linkert 2012-07-16 16:35:03 CDT
I assume that Sebi is using this:

https://github.com/uw-loci/misc-plugins/blob/master/src/main/java/loci/plugins/VisualizeTiles.java

The problem seems to be this line:

https://github.com/uw-loci/misc-plugins/blob/master/src/main/java/loci/plugins/VisualizeTiles.java#L110

...which passes a relative path name when it should pass an absolute path name.  I have opened a GitHub pull request which should fix this:

https://github.com/uw-loci/misc-plugins/pull/1
Comment 7 Stephan Preibisch 2012-07-16 16:38:43 CDT
I could additionally store the fully path name in the file if this would help?
Comment 8 Melissa Linkert 2012-07-16 18:38:43 CDT
(In reply to comment #7)
> I could additionally store the fully path name in the file if this would help?
> 

Obviously that's up to you, but I don't know that it would help in general, as anyone with existing TileConfiguration*.txt files will still be affected by the bug in VisualizeTiles.  If you do write absolute paths to TileConfiguration*.txt, then any code that parses those files must now be updated to check that the absolute path really does exist, and do something smart if it does not (in other words: consider that the user might end up moving the directory with the images and stitching results).
Comment 9 Stephan Preibisch 2012-07-16 18:43:05 CDT
Relative paths are better as it is otherwise liked to the system it was registered on. But I could add the absolute path as a tag that you could parse if it exists ...
Comment 10 Curtis Rueden 2012-08-06 21:59:57 CDT
No need to change the Stitching plugin, Steffi; Melissa's patch to VisualizeTiles should hopefully resolve the issue.

I have pushed a new version of the misc_plugins (which includes Visualize Tiles) to LOCI Fiji's update site. Note that this version also removes the obsolete "Stitch OME-TIFFs" plugin, since Steffi's new-and-improved "Grid/Collection stitching" does everything it could do, and more.

Sebastian, please check whether this update resolves the issue for you, and if so, close the ticket.

Thanks very much to everyone (especially Melissa) for resolving this issue in my crappy plugin without any assistance from me!
Comment 11 Sebastian Rhode 2012-08-07 09:47:07 CDT
Hi guys,

so I update my Fiji today and there where some updates. But a few things confuse me a bit.

1) I still see the Stitch OME-TIFFs under the Stitching Plugins
2) When I try visualize tiles I am ask for a configuration file; I open the file and still get the errors, which I reported when the bug was opened

Cheers, Sebi
Comment 12 Curtis Rueden 2012-08-07 20:08:23 CDT
I tested it on two different systems here and both, when fully updated, have the latest misc_plugins JAR with "Stitch OME-TIFFs" removed from the Stitching menu, and the Visualize Tiles behavior updated. That said, I did not actually test whether the new Visualize Tiles code fixes this bug (I'd still like feedback on that). However, the fact that "Stitch OME-TIFFs" is still present in your menu structure tells me that your misc_plugins JAR is not actually the latest. So something very odd is going on.

If you click "Advanced mode" in the Updater and change the View Options to "View files of the 'LOCI' site" do you see that plugins/LOCI/misc_plugins-1.0.0-SNAPSHOT.jar is Up-to-date?
Comment 13 Sebastian Rhode 2012-08-08 08:37:56 CDT
Hi,

so good news. I found the reason for the problem. In my Fiji folderv there still was a file misc_plugins-1.0-SNAPSHOT.jar. So this was the reason for still having the Stitch OME-TIFF. And a couple of weeks ago I had some trouble with the updater and our proxy. For whatever reason this lead to the loss of the LOCI update site adress, which I did not noticed. But I updated every to day and now the stitch OME-TIFFs is gone.

Regaring the Visualize TILE problem, i tried again. The result was I colored "checher board" iwth the correct number tiles, but no image data. Is this the expected output?

Sebi
Comment 14 Curtis Rueden 2012-08-09 21:21:47 CDT
> Regaring the Visualize TILE problem, i tried again. The result was I colored
> "checher board" iwth the correct number tiles, but no image data. Is this the
> expected output?

Yes, that is expected. The point of that plugin is to show you *where* your tiles will go as quickly as possible. I wrote it because otherwise, waiting for the "Fuse and display" step for large datasets can take a very long time, even with "Average" or "Min" or "Max" fusion methods. The plugin was merely intended as a way to verify that your stitching is sane.
Comment 15 stiv 2015-06-20 09:37:06 CDT
Created attachment 252
attach