Skip to content

Commit

Permalink
Rename 'min' n5 attribute to 'offset' to avoid a bug in the Fiji N5 p…
Browse files Browse the repository at this point in the history
…lugin ( https://github.com/saalfeldlab/n5-ij ) and to be consistent with some other n5 tools.  @bogovicj plans to fix the Fiji N5 plugin bug soon.
  • Loading branch information
trautmane committed Jul 26, 2023
1 parent f0a8de4 commit 6c21396
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ else if ( StorageType.HDF5.equals(storageType) )

System.out.println( "numBlocks = " + grid.size() );

driverVolumeWriter.setAttribute( n5Dataset, "min", minBB );
driverVolumeWriter.setAttribute( n5Dataset, "offset", minBB );

// saving metadata if it is bdv-compatible (we do this first since it might fail)
if ( bdvString != null )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ else if ( StorageType.HDF5.equals(storageType) )

System.out.println( "numBlocks = " + grid.size() );

driverVolumeWriter.setAttribute( n5Dataset, "min", min);
driverVolumeWriter.setAttribute( n5Dataset, "offset", min);

// saving metadata if it is bdv-compatible (we do this first since it might fail)
if ( bdvString != null )
Expand Down

2 comments on commit 6c21396

@trautmane
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bellonet ...

to use the current Fiji N5 viewer to view an n5 that has the 'min' attribute, @bogovicj also suggested the following workaround:

  1. in the open n5 dialog, go to the "Spatial Metadata" tab at the top
  2. type in any string that's not "min" in the field for "min intensity key"

spacial-tab

  1. use the plugin as usual

  2. the volume should be openable as usual

main-tab

@bogovicj
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for posting the workaround. For reference, the fix of this bug is here:
saalfeldlab/n5-universe@bc599d1

Please sign in to comment.