Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support NGFF using n5-universe #328

Merged
merged 134 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
8297a25
Move project related class to io sub-package.
tinevez Aug 8, 2023
3dc7622
MamutProjectIO has only static methods now.
tinevez Aug 9, 2023
c94521d
WIP: rework the app model and the project IO.
tinevez Aug 15, 2023
f1fdc9c
Add missing classes from the WIP.
tinevez Aug 16, 2023
169eb9a
Rework project loading / saving.
tinevez Aug 16, 2023
58ffc97
Rename appActions and globalAppActions.
tinevez Aug 16, 2023
d1874a8
Remove unused fields.
tinevez Aug 16, 2023
50d26bc
Remove duplicate fields in WindowManager.
tinevez Aug 16, 2023
b41efdd
Rename MamutAppModel in ProjectModel.
tinevez Aug 17, 2023
4b9a6ce
Fix deprecation of addTimePointListeners()
tinevez Aug 17, 2023
834644e
Fix depracation warnings with some YAML constructors.
tinevez Aug 17, 2023
ea3908d
Remove the use of deprecated BDV classes.
tinevez Aug 17, 2023
d2c7caa
Do not try to load GUI settings when creating new projects.
tinevez Aug 17, 2023
7454148
Fix minor warnings.
tinevez Aug 17, 2023
d095a1c
Add and use convenience methods for opening / creating projects.
tinevez Aug 17, 2023
758dd82
Move the importer package into the io package.
tinevez Aug 17, 2023
b3ed8a7
Store style managers in a common map.
tinevez Aug 17, 2023
226c838
Make an interface for views that have and use a context chooser.
tinevez Aug 17, 2023
73f13f4
Manage views and branch views in a common fields.
tinevez Aug 17, 2023
c737102
Remoe unused import.
tinevez Aug 17, 2023
20b7bfd
Rework a bit the forEeach methods of the window manager.
tinevez Aug 17, 2023
021a961
Remove the now empty settings menu in bdv views.
tinevez Aug 17, 2023
87f5121
Fix the size of the feature color mode panel.
tinevez Aug 17, 2023
d276faa
Move ColorBarOverlay in a more suitable package.
tinevez Aug 18, 2023
a2a4838
Interface for views that some special components.
tinevez Aug 18, 2023
fc960d5
Use the right opn() method when opening a project from the launcher.
tinevez Aug 18, 2023
65a2403
Tentative factory design for mamut views.
tinevez Aug 18, 2023
ff87422
Tentative factory for BDV views.
tinevez Aug 18, 2023
4faf38d
Rework the mother interfaces for Mastodon and Mamut views.
tinevez Aug 18, 2023
7537f36
The mamut view factory uses MamutViewI.
tinevez Aug 18, 2023
e3a1738
A factory for branch bdv views.
tinevez Aug 18, 2023
88fc3c2
Use the common MamutViewI interface in WindowManager.
tinevez Aug 18, 2023
22aedf1
Let MamutBranchViewBdv implements HasColorBarOverlay & HasColoringModel.
tinevez Aug 18, 2023
ea722f6
Factory pattern for trackscheme views.
tinevez Aug 18, 2023
480bdc3
Factory pattern for the table views.
tinevez Aug 18, 2023
48146a9
Use a separate class for selection tables.
tinevez Aug 19, 2023
c0000b9
Factory pattern for grapher views.
tinevez Aug 19, 2023
192174f
Move mamut view classes in the respective views subpackages.
tinevez Aug 19, 2023
9c660be
Use the new view factories everywhere in Mastodon.
tinevez Aug 20, 2023
6003af3
Make the createView() method synchronized.
tinevez Aug 21, 2023
88dafd0
Use a discoverable pattern for style managers and settings page.
tinevez Aug 21, 2023
f114f35
Remove unused class.
tinevez Aug 21, 2023
e1e5b2b
Use a common utility to discover plugins.
tinevez Aug 21, 2023
dd191bc
Remove unused method.
tinevez Aug 21, 2023
2b45a2d
Add TODO.
tinevez Aug 21, 2023
6f22746
Replace KeyMap and associated classes by upstream implementations.
tinevez Aug 21, 2023
071c490
Add some javadoc.
tinevez Aug 21, 2023
b80159b
Recompute min & max timepoint everytime they are queried.
tinevez Aug 22, 2023
c109126
Code style changes.
tinevez Aug 22, 2023
5364271
An intermediate abstract class for style managers with YAML.
tinevez Aug 23, 2023
6db9f93
Use the YAML style manager as mother class for Mastodon style managers.
tinevez Aug 23, 2023
d090c58
Offer facilities to deserialize from YAML with catchable errors.
tinevez Aug 23, 2023
06893eb
Better error messages when we cannot open the project.xml file.
tinevez Aug 24, 2023
b2aed83
The launcher log panel should not be editable.
tinevez Aug 24, 2023
e7ecd3d
Make it possible to recuperate when we cannot find the image data file.
tinevez Aug 24, 2023
266f086
Rework interactive project opening, local or remote.
tinevez Aug 24, 2023
ac491a1
Determine physical units if missing when creating new projects.
tinevez Aug 24, 2023
bbccb23
Ask for a file to save to if one was not set before.
tinevez Aug 24, 2023
02e5672
When creating a view, returns null if the view type is unknown.
tinevez Aug 24, 2023
94e780d
Do not close the project if we failed to save it when converting to BDV.
tinevez Aug 24, 2023
3d00ca6
Close the main window when a project is closed.
tinevez Aug 24, 2023
fecec3d
Do not run saveProjectAs on multiple forking threads.
tinevez Aug 24, 2023
0d573b6
Show the project name on the main window.
tinevez Aug 24, 2023
9ef123f
Some javadoc.
tinevez Aug 24, 2023
832220e
The ProjectModel can return a suitable project name.
tinevez Aug 24, 2023
c2f8cea
The window manager manages a list of extra windows.
tinevez Aug 24, 2023
4a95609
Update all the window names when a project change name.
tinevez Aug 24, 2023
beff479
The interactive LauncherUtils methods should not throw exceptions.
tinevez Aug 25, 2023
a017963
Fix javadoc errors.
tinevez Aug 25, 2023
19a6ba8
Fix javadoc warnings.
tinevez Aug 25, 2023
7f7422f
Remove superficious type in the FocusModel.
tinevez Aug 25, 2023
6ebff35
Save BDV settings when we save a Mastodon file.
tinevez Aug 25, 2023
51a7cb0
Add the colorbar overlay to the trackscheme branch view.
tinevez Aug 25, 2023
1dab542
Make the color bar overlay listenable.
tinevez Aug 25, 2023
e656e6f
Use a dedicated menu class for the colorbar overlay menu.
tinevez Aug 25, 2023
57e5114
When loading a project, build the branch graph.
tinevez Aug 25, 2023
2ca2de8
Have a launcher main class that exits gracefully.
tinevez Aug 25, 2023
d8bea1d
When restoring a BDV view, wait a bit before restoring the transform.
tinevez Aug 25, 2023
72f6408
Less gigantic size for the tag-set editor.
tinevez Aug 27, 2023
7c12c38
FeatureSpecsService must have EXTREMELY_LOW priority.
tinevez Aug 29, 2023
5e623aa
Be more cautious when meeting an error we don't know about.
tinevez Aug 29, 2023
eefcf7a
Merge branch 'rework-app-model' of github.com:mastodon-sc/mastodon in…
tinevez Aug 30, 2023
abb28c5
Add description for the online doc action.
tinevez Aug 30, 2023
b8ee2db
Fix keystroke context for ShowSelectedTracksActions.
tinevez Aug 30, 2023
d950e6b
In the preferences dialog, make a sub-category for core settings page.
tinevez Aug 30, 2023
0d4dc73
Add a method to handle legacy config files for styles.
tinevez Aug 30, 2023
49ec370
Add commonly useful lazy features.
tinevez Sep 8, 2023
dca0534
Make sure the projections() method of feature is called only once,
tinevez Sep 8, 2023
cc13836
Update parent to pom-scijava v37.0.0
tinevez Oct 14, 2023
869f60a
Depend on beta-25 for mastodon-collection and mastodon-graph.
tinevez Oct 14, 2023
cee3b9a
Depend on bdv-core v10.4.8
tinevez Oct 14, 2023
d255a60
Remove opening of remote datasets (S3) for now.
tinevez Oct 14, 2023
3b124ee
Fix bogus import of Font from itext.
tinevez Oct 14, 2023
16ae072
Cleanup pom.xml.
tinevez Oct 14, 2023
7c8d261
Make WindowsManager.getViewList( final Class< T > klass ) public
ksugar Oct 13, 2023
42004a1
Don't let a piublic method mofify the state of the window manager.
tinevez Oct 14, 2023
a1962bf
Add n5-universe
ksugar Nov 18, 2023
5a1b680
Merge remote-tracking branch 'upstream/dev' into n5universe
ksugar Nov 25, 2023
885f623
Remove vscode related files from index
ksugar Nov 25, 2023
8b7f218
Merge remote-tracking branch 'upstream/dev' into n5universe
ksugar Jan 12, 2024
05b3905
Remove old ome.zarr test data
ksugar Jan 22, 2024
8aefe30
Add new ome.zarr test data
ksugar Jan 22, 2024
0ad0daf
Update n5-universe version to 1.3.0
ksugar Jan 22, 2024
593f306
Update N5Universe loader
ksugar Jan 22, 2024
91b67ca
Fix imports
ksugar Jan 22, 2024
4c97a5b
Update test dataset xml files
ksugar Jan 22, 2024
54c3d1d
Merge remote-tracking branch 'upstream/dev' into n5universe
ksugar Feb 24, 2024
d9b9c24
Update LICENSE
ksugar Feb 24, 2024
84d9770
Update the version of n5-universe to 1.3.2-SNAPSHOT
ksugar Feb 24, 2024
f96b379
Add an example settings file for S3 stored data
ksugar Feb 24, 2024
b700500
Merge remote-tracking branch 'upstream/dev' into n5universe
ksugar Apr 16, 2024
0b0c274
work in progress
ksugar Apr 18, 2024
f69a9ea
Remove double slashes
ksugar Apr 18, 2024
17ea98a
Minor fixes
ksugar Apr 19, 2024
b211ffa
Work in progress
ksugar Jul 30, 2024
7d8c13c
Merge remote-tracking branch 'upstream/dev' into n5universe
ksugar Sep 2, 2024
1d3e66d
Use stored credentials if exits
ksugar Sep 3, 2024
ce55d88
Keep FeatureSpecsService updated
ksugar Sep 4, 2024
107b6e3
Update pom.xml
ksugar Sep 4, 2024
5279ec3
Add xml file for n5 in s3
ksugar Sep 10, 2024
17912c2
Implement getNumSetups and update test files
ksugar Sep 10, 2024
ed7c41d
Organize packages to separate mobie-derived modules
ksugar Sep 10, 2024
b7d3a2e
Update pom-scijava version to 38.0.1
ksugar Sep 14, 2024
2e08416
Implement getMetadata
ksugar Sep 14, 2024
c98c368
Use n5-viewer_fiji as backend
ksugar Sep 18, 2024
bf08628
Update pom-scijava version to 37.0.0
ksugar Sep 28, 2024
a09cc7c
Make compatible with both N5 and OME-Zarr
ksugar Sep 28, 2024
75a5b7a
Keep the dependencies updated with the latest version available in Fiji
ksugar Sep 28, 2024
333f12c
Use IJ's current directory for the default directory for saving xml
ksugar Sep 28, 2024
3c700f5
Update dependencies
ksugar Oct 4, 2024
abcc123
Minor fixes
ksugar Oct 4, 2024
c675ce2
Fix issues
ksugar Oct 4, 2024
22381cc
Merge remote-tracking branch 'upstream/dev' into n5universe
ksugar Oct 4, 2024
f2d7cd0
Remove old test data
ksugar Oct 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 40 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<groupId>cisd</groupId>
<artifactId>jhdf5</artifactId>
</dependency>

<!-- ImgLib2 dependencies -->
<dependency>
<groupId>org.scijava</groupId>
Expand All @@ -77,7 +77,39 @@
<groupId>net.imglib2</groupId>
<artifactId>imglib2-roi</artifactId>
</dependency>


<!-- N5 dependencies. -->
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-universe</artifactId>
<version>1.6.0</version>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-google-cloud</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-aws-s3</artifactId>
<version>4.2.0</version>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-viewer_fiji</artifactId>
<version>6.1.1</version>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-ij</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>org.janelia.saalfeldlab</groupId>
<artifactId>n5-zarr</artifactId>
<version>1.3.4</version>
</dependency>

<!-- Misc dependencies. -->
<dependency>
<groupId>com.opencsv</groupId>
Expand All @@ -99,6 +131,12 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>uk.org.webcompere</groupId>
<artifactId>system-stubs-junit4</artifactId>
<version>2.1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>sc.fiji</groupId>
<artifactId>TrackMate</artifactId>
Expand All @@ -109,7 +147,6 @@
<artifactId>MaMuT</artifactId>
<scope>test</scope>
</dependency>


</dependencies>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
/*-
* #%L
* Mastodon
* %%
* Copyright (C) 2014 - 2024 Mastodon developers
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* #L%
*/
package org.mastodon.mamut.io.img.cache;

import java.io.IOException;

import bdv.img.cache.CacheArrayLoader;
import bdv.img.cache.CreateInvalidVolatileCell;
import bdv.img.cache.DefaultEmptyArrayCreator;
import bdv.img.cache.EmptyArrayCreator;
import bdv.img.cache.SimpleCacheArrayLoader;
import net.imglib2.img.basictypeaccess.DataAccess;
import net.imglib2.img.basictypeaccess.volatiles.VolatileArrayDataAccess;
import net.imglib2.img.basictypeaccess.volatiles.array.DirtyVolatileByteArray;
import net.imglib2.img.basictypeaccess.volatiles.array.DirtyVolatileCharArray;
import net.imglib2.img.basictypeaccess.volatiles.array.DirtyVolatileDoubleArray;
import net.imglib2.img.basictypeaccess.volatiles.array.DirtyVolatileFloatArray;
import net.imglib2.img.basictypeaccess.volatiles.array.DirtyVolatileIntArray;
import net.imglib2.img.basictypeaccess.volatiles.array.DirtyVolatileLongArray;
import net.imglib2.img.basictypeaccess.volatiles.array.DirtyVolatileShortArray;
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileByteArray;
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileCharArray;
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileDoubleArray;
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileFloatArray;
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileIntArray;
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileLongArray;
import net.imglib2.img.basictypeaccess.volatiles.array.VolatileShortArray;
import net.imglib2.img.cell.CellGrid;
import net.imglib2.type.NativeType;

public interface MastodonSimpleCacheArrayLoader< A extends DataAccess > extends SimpleCacheArrayLoader< A >
{

/**
* Implementing classes must override this if {@code A} is not a standard
* {@link VolatileArrayDataAccess} type. The default implementation returns
* {@code null}, which will let
* {@link CreateInvalidVolatileCell#get(CellGrid, NativeType, boolean)
* CreateInvalidVolatileCell.get(...)} try to figure out the appropriate
* {@link DefaultEmptyArrayCreator}.
* <p>
* Default access types are
* </p>
* <ul>
* <li>{@link DirtyVolatileByteArray}</li>
* <li>{@link VolatileByteArray}</li>
* <li>{@link DirtyVolatileCharArray}</li>
* <li>{@link VolatileCharArray}</li>
* <li>{@link DirtyVolatileDoubleArray}</li>
* <li>{@link VolatileDoubleArray}</li>
* <li>{@link DirtyVolatileFloatArray}</li>
* <li>{@link VolatileFloatArray}</li>
* <li>{@link DirtyVolatileIntArray}</li>
* <li>{@link VolatileIntArray}</li>
* <li>{@link DirtyVolatileLongArray}</li>
* <li>{@link VolatileLongArray}</li>
* <li>{@link DirtyVolatileShortArray}</li>
* <li>{@link VolatileShortArray}</li>
* </ul>
*
* @return an {@link EmptyArrayCreator} for {@code A} or null.
*/
default EmptyArrayCreator< A > getEmptyArrayCreator()
{
return null;
}

/**
* Load cell data into memory. This method blocks until data is successfully
* loaded. If it completes normally, the returned data is always valid. If
* anything goes wrong, an {@link IOException} is thrown.
* <p>
* {@code SimpleCacheArrayLoader} is supposed to load data one specific
* image. {@code loadArray()} will not get information about which
* timepoint, resolution level, etc a requested block belongs to.
* <p>
* This is in contrast to
* {@link CacheArrayLoader#loadArray(int, int, int, int[], long[])}, where
* all information to identify a particular block in a whole dataset is
* provided.
*
* @param gridPosition
* the coordinate of the cell in the cell grid.
* @param cellDimensions
* the dimensions of the cell.
* @param timepoint
* the timepoint.
*
* @return loaded cell data.
*/
A loadArrayAtTimepoint( long[] gridPosition, int[] cellDimensions, int timepoint ) throws IOException;
}
Loading
Loading