Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
File renamed without changes.
86 changes: 75 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@
<license.projectName>N5 Viewer</license.projectName>
<license.organizationName>Saalfeld Lab</license.organizationName>
<license.copyrightOwners>Igor Pisarev, Stephan Saalfeld</license.copyrightOwners>
<license.excludes>**/resources/**</license.excludes>
<!-- managed by `copy-resources` plugin -->
<license.skipUpdateLicense>true</license.skipUpdateLicense>
<license.skipUpdateProjectLicense>true</license.skipUpdateProjectLicense>

<scijava.jvm.version>8</scijava.jvm.version>

<!-- NB: Deploy releases to the SciJava Maven repository. -->
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>
Expand All @@ -134,16 +138,17 @@
<bigdataviewer-core.version>10.6.1</bigdataviewer-core.version>
<bigdataviewer-vistools.version>1.0.0-beta-36</bigdataviewer-vistools.version>

<n5.version>4.0.0-alpha-12</n5.version>
<n5-aws-s3.version>4.4.0-alpha-9</n5-aws-s3.version>
<n5-blosc.version>2.0.0-alpha-4</n5-blosc.version>
<n5-google-cloud.version>5.2.0-alpha-7</n5-google-cloud.version>
<n5-hdf5.version>2.3.0-alpha-7</n5-hdf5.version>
<n5-ij.version>4.5.0-alpha-7</n5-ij.version>
<n5-imglib2.version>7.1.0-alpha-8</n5-imglib2.version>
<n5-universe.version>2.4.0-alpha-9</n5-universe.version>
<n5-zarr.version>2.0.0-alpha-8</n5-zarr.version>
<n5-zstandard.version>2.0.0-alpha-4</n5-zstandard.version>
<n5.version>4.0.0</n5.version>
<n5-aws-s3.version>5.0.0</n5-aws-s3.version>
<n5-blosc.version>2.0.0</n5-blosc.version>
<n5-google-cloud.version>6.0.0</n5-google-cloud.version>
<n5-hdf5.version>3.0.0</n5-hdf5.version>
<n5-ij.version>5.0.0-alpha-8-SNAPSHOT</n5-ij.version>
<n5-imglib2.version>8.0.0</n5-imglib2.version>
<n5-universe.version>3.0.0</n5-universe.version>
<n5-zarr.version>2.0.0</n5-zarr.version>
<n5-zstandard.version>2.0.0</n5-zstandard.version>

</properties>

<dependencies>
Expand Down Expand Up @@ -227,4 +232,63 @@
<url>https://maven.scijava.org/content/groups/public</url>
</repository>
</repositories>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*.json</exclude>
<exclude>**/resources/**</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>timestamp-property</id>
<goals>
<goal>timestamp-property</goal>
</goals>
<phase>validate</phase>
<configuration>
<name>current.year</name>
<pattern>yyyy</pattern>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}</outputDirectory>
<resources>
<resource>
<directory>doc</directory>
<includes>
<include>*.md</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control;

/**
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/org/janelia/saalfeldlab/control/Control.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control;

import java.util.Set;
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/org/janelia/saalfeldlab/control/IntControl.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control;

import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control.mcu;

import java.util.function.IntConsumer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control.mcu;

import java.util.function.IntConsumer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control.mcu;

import java.util.HashSet;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control.mcu;

import javax.sound.midi.InvalidMidiDataException;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control.mcu;

import java.util.function.IntConsumer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control.mcu;

import java.util.concurrent.Future;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
*
*/
package org.janelia.saalfeldlab.control.mcu;

import javax.sound.midi.InvalidMidiDataException;
Expand Down
21 changes: 0 additions & 21 deletions src/main/java/org/janelia/saalfeldlab/n5/bdv/ColorGenerator.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
/*-
* #%L
* N5 Viewer
* %%
* Copyright (C) 2017 - 2022 Igor Pisarev, Stephan Saalfeld
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
package org.janelia.saalfeldlab.n5.bdv;

import java.util.Random;
Expand Down
21 changes: 0 additions & 21 deletions src/main/java/org/janelia/saalfeldlab/n5/bdv/CropController.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
/*-
* #%L
* N5 Viewer
* %%
* Copyright (C) 2017 - 2022 Igor Pisarev, Stephan Saalfeld
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
package org.janelia.saalfeldlab.n5.bdv;

import java.awt.Checkbox;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
/*-
* #%L
* N5 Viewer
* %%
* Copyright (C) 2017 - 2022 Igor Pisarev, Stephan Saalfeld
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
package org.janelia.saalfeldlab.n5.bdv;

import java.util.Arrays;
Expand Down
64 changes: 9 additions & 55 deletions src/main/java/org/janelia/saalfeldlab/n5/bdv/N5Viewer.java
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
/*-
* #%L
* N5 Viewer
* %%
* Copyright (C) 2017 - 2022 Igor Pisarev, Stephan Saalfeld
* %%
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program. If not, see
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* #L%
*/
package org.janelia.saalfeldlab.n5.bdv;

import static bdv.BigDataViewer.createConverterToARGB;
Expand Down Expand Up @@ -77,10 +56,9 @@
import org.janelia.saalfeldlab.n5.universe.metadata.canonical.CanonicalMultichannelMetadata;
import org.janelia.saalfeldlab.n5.universe.metadata.canonical.CanonicalMultiscaleMetadata;
import org.janelia.saalfeldlab.n5.universe.metadata.canonical.CanonicalSpatialMetadata;
import org.janelia.saalfeldlab.n5.universe.metadata.ome.ngff.v04.NgffSingleScaleAxesMetadata;
import org.janelia.saalfeldlab.n5.universe.metadata.ome.ngff.v04.OmeNgffMetadata;
import org.janelia.saalfeldlab.n5.universe.metadata.ome.ngff.v04.OmeNgffMultiScaleMetadata;
import org.janelia.saalfeldlab.n5.universe.metadata.ome.ngff.v05.OmeNgffV05Metadata;
import org.janelia.saalfeldlab.n5.universe.metadata.ome.ngff.NgffSingleScaleAxesMetadata;
import org.janelia.saalfeldlab.n5.universe.metadata.ome.ngff.OmeNgffMetadata;
import org.janelia.saalfeldlab.n5.universe.metadata.ome.ngff.OmeNgffMultiScaleMetadata;
import org.scijava.ui.behaviour.io.InputTriggerConfig;
import org.scijava.ui.behaviour.util.Actions;
import org.scijava.ui.behaviour.util.InputActionBindings;
Expand Down Expand Up @@ -513,8 +491,10 @@ public static <T extends NumericType<T> & NativeType<T>, V extends Volatile<T> &
AffineTransform3D[] transforms = null;

final N5Metadata metadata = selectedMetadata.get(i);
final String srcName = metadata.getName();

String srcName = metadata.getName();
if( srcName == null || srcName.isEmpty()) {
srcName = n5.getURI().toString().replaceFirst("/$", "").replaceFirst(".*/", "");
}

// TODO: simplify this if/elseif block: much of these ifwall cases can be combined
if (metadata instanceof N5SingleScaleMetadata) {
Expand Down Expand Up @@ -544,12 +524,6 @@ public static <T extends NumericType<T> & NativeType<T>, V extends Volatile<T> &
.sort(multiScaleDataset.getPaths(), multiScaleDataset.spatialTransforms3d());
datasetsToOpen = msd.getPaths();
transforms = msd.getTransforms();
} else if (metadata instanceof OmeNgffV05Metadata) {
final OmeNgffV05Metadata multiScaleDataset = (OmeNgffV05Metadata)metadata;
final MultiscaleDatasets msd = MultiscaleDatasets
.sort(multiScaleDataset.getPaths(), multiScaleDataset.spatialTransforms3d());
datasetsToOpen = msd.getPaths();
transforms = msd.getTransforms();
} else if (metadata instanceof N5CosemMultiScaleMetadata) {
final N5CosemMultiScaleMetadata multiScaleDataset = (N5CosemMultiScaleMetadata)metadata;
final MultiscaleDatasets msd = MultiscaleDatasets
Expand Down Expand Up @@ -844,27 +818,6 @@ private static NgffSingleScaleAxesMetadata isNgffMultiscale(final N5Metadata met
if( children[0] instanceof NgffSingleScaleAxesMetadata)
return children[0];

}
else if (metadata instanceof OmeNgffV05Metadata) {

final OmeNgffV05Metadata ngff = (OmeNgffV05Metadata)metadata;
final OmeNgffMultiScaleMetadata[] ms = ngff.multiscales;

// TODO when do we not just take the first one?
final NgffSingleScaleAxesMetadata[] children = ms[0].getChildrenMetadata();
if( children.length > 0 )
if( children[0] instanceof NgffSingleScaleAxesMetadata)
return children[0];

}
else if(metadata instanceof OmeNgffMultiScaleMetadata )
{
final OmeNgffMultiScaleMetadata ms = (OmeNgffMultiScaleMetadata)metadata;
final NgffSingleScaleAxesMetadata[] children = ms.getChildrenMetadata();
if( children.length > 0 )
if( children[0] instanceof NgffSingleScaleAxesMetadata)
return children[0];

}

return null;
Expand All @@ -888,8 +841,9 @@ private static <T extends NumericType<T> & NativeType<T>, V extends NumericType<
for (int level = 0; level < images.length; ++level)
channels[level] = Views.hyperSlice(images[level], 2, c);

final String channelName = nChannels > 1 ? srcName + "_ch" + c : srcName;
final RandomAccessibleIntervalMipmapSource4D<T> source = new RandomAccessibleIntervalMipmapSource4D<>(
channels, type, transforms, vd, srcName, true);
channels, type, transforms, vd, channelName, true);

// TODO fix generics
final ValuePair<Source<T>, Source<V>> pair = new ValuePair(
Expand Down
Loading
Loading