Skip to content

Commit

Permalink
Updates dependencies
Browse files Browse the repository at this point in the history
Fix path issue in Windows (dirty)
Fix some intellij 'raw' class usage, let's hope it doesn't break anything
  • Loading branch information
NicoKiaru committed May 21, 2024
1 parent b74e7b2 commit ae9cc8d
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 27 deletions.
22 changes: 21 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,30 @@
<package-name>ch.epfl.biop.atlas</package-name>
<license.licenseName>gpl_v3</license.licenseName>
<license.copyrightOwners>EPFL</license.copyrightOwners>
<bigdataviewer-playground.version>0.8.1</bigdataviewer-playground.version>
<bigdataviewer-playground.version>0.10.1</bigdataviewer-playground.version>

<!-- NB: Deploy releases to the SciJava Maven repository. -->
<releaseProfiles>sign,deploy-to-scijava</releaseProfiles>


<n5.version>3.1.1</n5.version>
<n5-hdf5.version>2.1.0</n5-hdf5.version>
<n5-zarr.version>1.2.0</n5-zarr.version>
<n5-ij.version>4.0.1</n5-ij.version>
<n5-universe.version>1.3.1</n5-universe.version>
<n5-zstandard.version>1.0.2</n5-zstandard.version>
<org.janelia.n5-zstandard.version>${n5-zstandard.version}</org.janelia.n5-zstandard.version>

<bigwarp.version>9.1.2</bigwarp.version>
<bigwarp_fiji.version>9.1.2</bigwarp_fiji.version>
<bigdataviewer-core.version>10.4.13</bigdataviewer-core.version>
<bigdataviewer-vistools.version>1.0.0-beta-34</bigdataviewer-vistools.version>
<imglib2-realtransform.version>4.0.2</imglib2-realtransform.version>

<ejml-core.version>0.41</ejml-core.version>
<ejml-ddense.version>0.41</ejml-ddense.version>

<jitk-tps.version>3.0.4</jitk-tps.version>
</properties>

<repositories>
Expand Down
17 changes: 11 additions & 6 deletions src/main/java/ch/epfl/biop/atlas/mouse/allen/ccfv3/AllenMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public class AllenMap implements AtlasMap {
final static private int AraSetupId = 2;
final static private int LabelSetupId = 3;

final Map<String,SourceAndConverter> atlasSources = new HashMap<>();
final Map<String,SourceAndConverter<?>> atlasSources = new HashMap<>();

SourceAndConverter labelSource;
SourceAndConverter<?> labelSource;

@Override
public void initialize(String atlasName) {
Expand All @@ -70,6 +70,11 @@ public void initialize(String atlasName) {
address = address.substring(5).replaceAll("%20", " ");
}

// Fix a stupid issue... For some reason the path may contain an extra slash in windows
if (System.getProperty("os.name").startsWith("Windows") && address.startsWith("/")) {
address = address.substring(1);
}

SpimDataFromXmlImporter importer = new SpimDataFromXmlImporter(address);

final List<SourceAndConverter<?>> sacs = SourceAndConverterServices
Expand All @@ -89,14 +94,14 @@ public void initialize(String atlasName) {
}
};

FunctionRealRandomAccessible leftRightSource = new FunctionRealRandomAccessible(3,
FunctionRealRandomAccessible<UnsignedShortType> leftRightSource = new FunctionRealRandomAccessible<>(3,
leftRightIndicator, UnsignedShortType::new);

final Source< UnsignedShortType > s = new RealRandomAccessibleIntervalSource<>( leftRightSource,
FinalInterval.createMinMax( 0, 0, 0, 1000, 1000, 0),
new UnsignedShortType(), new AffineTransform3D(), "Left_Right" );

SourceAndConverter leftRight = SourceAndConverterHelper.createSourceAndConverter(s);
SourceAndConverter<?> leftRight = SourceAndConverterHelper.createSourceAndConverter(s);

atlasSources.put("Left Right", leftRight);

Expand All @@ -123,7 +128,7 @@ public URL getDataSource() {
}

@Override
public Map<String,SourceAndConverter> getStructuralImages() {
public Map<String,SourceAndConverter<?>> getStructuralImages() {
return atlasSources;
}

Expand All @@ -141,7 +146,7 @@ public List<String> getImagesKeys() {
}

@Override
public SourceAndConverter getLabelImage() {
public SourceAndConverter<?> getLabelImage() {
return labelSource;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public class WaxholmSpragueDawleyRatV4Map implements AtlasMap {

public String name;

final Map<String,SourceAndConverter> atlasSources = new HashMap<>();
final Map<String,SourceAndConverter<?>> atlasSources = new HashMap<>();

SourceAndConverter labelSource;
SourceAndConverter<?> labelSource;

@Override
public void setDataSource(URL dataSource) {
Expand Down Expand Up @@ -94,14 +94,14 @@ public void initialize(String atlasName) {
}
};

FunctionRealRandomAccessible leftRightSource = new FunctionRealRandomAccessible(3,
FunctionRealRandomAccessible<UnsignedShortType> leftRightSource = new FunctionRealRandomAccessible<>(3,
leftRightIndicator, UnsignedShortType::new);

final Source< UnsignedShortType > s = new RealRandomAccessibleIntervalSource<>( leftRightSource,
FinalInterval.createMinMax( 0, 0, 0, 1000, 1000, 0),
new UnsignedShortType(), new AffineTransform3D(), "Left_Right" );

SourceAndConverter leftRight = SourceAndConverterHelper.createSourceAndConverter(s);
SourceAndConverter<?> leftRight = SourceAndConverterHelper.createSourceAndConverter(s);

atlasSources.put("Left Right", leftRight);

Expand All @@ -121,7 +121,7 @@ public void initialize(String atlasName) {
}

@Override
public Map<String,SourceAndConverter> getStructuralImages() {
public Map<String,SourceAndConverter<?>> getStructuralImages() {
return atlasSources;
}

Expand All @@ -138,7 +138,7 @@ public List<String> getImagesKeys() {
}

@Override
public SourceAndConverter getLabelImage() {
public SourceAndConverter<?> getLabelImage() {
return labelSource;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ public class WaxholmSpragueDawleyRatV4p2Map implements AtlasMap {

public String name;

final Map<String,SourceAndConverter> atlasSources = new HashMap<>();
final Map<String,SourceAndConverter<?>> atlasSources = new HashMap<>();

SourceAndConverter labelSource;
SourceAndConverter<?> labelSource;

@Override
public void setDataSource(URL dataSource) {
Expand All @@ -74,6 +74,11 @@ public void initialize(String atlasName) {
address = address.substring(5).replaceAll("%20", " ");
}

// Fix a stupid issue... For some reason the path may contain an extra slash in windows
if (System.getProperty("os.name").startsWith("Windows") && address.startsWith("/")) {
address = address.substring(1);
}

SpimDataFromXmlImporter importer = new SpimDataFromXmlImporter(address);

final List<SourceAndConverter<?>> sacs = SourceAndConverterServices
Expand All @@ -96,14 +101,14 @@ public void initialize(String atlasName) {
}
};

FunctionRealRandomAccessible leftRightSource = new FunctionRealRandomAccessible(3,
FunctionRealRandomAccessible<UnsignedShortType> leftRightSource = new FunctionRealRandomAccessible<>(3,
leftRightIndicator, UnsignedShortType::new);

final Source< UnsignedShortType > s = new RealRandomAccessibleIntervalSource<>( leftRightSource,
FinalInterval.createMinMax( 0, 0, 0, 1000, 1000, 0),
new UnsignedShortType(), new AffineTransform3D(), "Left_Right" );

SourceAndConverter leftRight = SourceAndConverterHelper.createSourceAndConverter(s);
SourceAndConverter<?> leftRight = SourceAndConverterHelper.createSourceAndConverter(s);

atlasSources.put("Left Right", leftRight);

Expand All @@ -123,7 +128,7 @@ public void initialize(String atlasName) {
}

@Override
public Map<String,SourceAndConverter> getStructuralImages() {
public Map<String,SourceAndConverter<?>> getStructuralImages() {
return atlasSources;
}

Expand All @@ -141,7 +146,7 @@ public List<String> getImagesKeys() {
}

@Override
public SourceAndConverter getLabelImage() {
public SourceAndConverter<?> getLabelImage() {
return labelSource;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,18 @@ public void run() {
try {
switch (choice) {
case WaxholmSpragueDawleyRatV4p2Atlas.atlasName:
//System.out.println("RAT (Java)");
atlas = (Atlas) cmd.run(WaxholmSpragueDawleyRatV4p2Command.class, true).get().getOutput("ba");
break;
case AllenBrainAdultMouseAtlasCCF2017v3p1Command.atlasName:
//System.out.println("MOUSE (Java)");
atlas = (Atlas) cmd.run(AllenBrainAdultMouseAtlasCCF2017v3p1Command.class, true).get().getOutput("ba");
break;
default:
if (extraAtlases.containsKey(choice)) {
//System.out.println(choice+" (Python)");
atlas = extraAtlases.get(choice).get();
//System.out.println("Atlas null ? "+(atlas==null));
} else {
System.err.println("Unrecognized atlas named " + choice);
}
Expand Down
14 changes: 6 additions & 8 deletions src/main/java/ch/epfl/biop/atlas/struct/AtlasMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,13 @@

/**
* Interface to define an AtlasMap
*
* <br>
* Pairs with AtlasOntology
*
* <br>
* The Atlas Map contains :
* - 3D images among which there are:
* - structural images, which are different modalities acquired for an atlas (fluorescence, brightfield)
* - a single Label Image
*
*
*/
public interface AtlasMap {

Expand All @@ -50,21 +48,21 @@ public interface AtlasMap {

/**
* Triggers the initialisation of the Atlas
* @param atlasName
* @param atlasName name to give to the atlas
*/
void initialize(String atlasName);

/**
* For convenience
* @return
* @return the original URL of where the data was read from
*/
URL getDataSource();

Map<String,SourceAndConverter> getStructuralImages();
Map<String,SourceAndConverter<?>> getStructuralImages();

List<String> getImagesKeys();

SourceAndConverter getLabelImage();
SourceAndConverter<?> getLabelImage();

Double getAtlasPrecisionInMillimeter();

Expand Down

0 comments on commit ae9cc8d

Please sign in to comment.