mirror of
https://github.com/paulscherrerinstitute/ch.psi.imagej.hdf5.git
synced 2025-06-26 11:41:09 +02:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
75e490fa18 | |||
70fa714aac |
@ -99,6 +99,8 @@ To create an all in one zip file for installation in a ImageJ installation use:
|
|||||||
|
|
||||||
The zip file contains an all in one jar as well as the required native libraries for Windows, Linux and Mac OS X.
|
The zip file contains an all in one jar as well as the required native libraries for Windows, Linux and Mac OS X.
|
||||||
|
|
||||||
|
Note: to be able to build the package you need to have access to the PSI artifact server. Therefore this only works within the PSI networks and if you have a certain maven configuration. An example Maven settings.xml that you can copy to `~/.m2/settings.xml` is located [here](settings.xml).
|
||||||
|
|
||||||
# Acknowledgements
|
# Acknowledgements
|
||||||
This project was inspired by the ImageJ HDF Plugin of Matthias Schlachter Chair of Pattern Recognition and Image Processing, University of Freiburg, Germany ( https://code.google.com/p/imagej-hdf ) .
|
This project was inspired by the ImageJ HDF Plugin of Matthias Schlachter Chair of Pattern Recognition and Image Processing, University of Freiburg, Germany ( https://code.google.com/p/imagej-hdf ) .
|
||||||
It is a complete rewrite of the code with the focus on efficiency and maintainability
|
It is a complete rewrite of the code with the focus on efficiency and maintainability
|
||||||
|
2
pom.xml
2
pom.xml
@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>ch.psi</groupId>
|
<groupId>ch.psi</groupId>
|
||||||
<artifactId>imagej.hdf5</artifactId>
|
<artifactId>imagej.hdf5</artifactId>
|
||||||
<version>0.11.0</version>
|
<version>0.12.0</version>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
44
settings.xml
Normal file
44
settings.xml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
<id>central</id>
|
||||||
|
<name>libs-releases</name>
|
||||||
|
<url>http://artifacts.psi.ch/artifactory/libs-releases</url>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<snapshots />
|
||||||
|
<id>snapshots</id>
|
||||||
|
<name>libs-snapshots</name>
|
||||||
|
<url>http://artifacts.psi.ch/artifactory/libs-snapshots</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
<id>central</id>
|
||||||
|
<name>libs-releases</name>
|
||||||
|
<url>http://artifacts.psi.ch/artifactory/libs-releases</url>
|
||||||
|
</pluginRepository>
|
||||||
|
<pluginRepository>
|
||||||
|
<snapshots />
|
||||||
|
<id>snapshots</id>
|
||||||
|
<name>libs-releases</name>
|
||||||
|
<url>http://artifacts.psi.ch/artifactory/libs-releases</url>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
<id>artifactory</id>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
<activeProfiles>
|
||||||
|
<activeProfile>artifactory</activeProfile>
|
||||||
|
</activeProfiles>
|
||||||
|
</settings>
|
@ -46,7 +46,12 @@ public class HDF5Reader implements PlugIn {
|
|||||||
* dataset=/your/path/to/dataset
|
* dataset=/your/path/to/dataset
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public ImageStack open(String arg, boolean interactive, String filename, String nameOfDataset, boolean virtualstack) {
|
public ImageStack open(String arg, boolean interactive, String filename, String nameOfDataset, boolean virtualstack) {
|
||||||
|
return open(arg, interactive, filename, nameOfDataset, virtualstack, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ImageStack open(String arg, boolean interactive, String filename, String nameOfDataset, boolean virtualstack, boolean showImage) {
|
||||||
|
|
||||||
// Map arguments = HDF5Reader.parseArguments(arg);
|
// Map arguments = HDF5Reader.parseArguments(arg);
|
||||||
|
|
||||||
@ -118,7 +123,9 @@ public class HDF5Reader implements PlugIn {
|
|||||||
|
|
||||||
ImagePlus imp = new ImagePlus(filename, stack);
|
ImagePlus imp = new ImagePlus(filename, stack);
|
||||||
imp.resetDisplayRange();
|
imp.resetDisplayRange();
|
||||||
imp.show();
|
if(showImage) {
|
||||||
|
imp.show();
|
||||||
|
}
|
||||||
|
|
||||||
stacks.add(stack);
|
stacks.add(stack);
|
||||||
return stack; // TODO should return stacks instead of stack
|
return stack; // TODO should return stacks instead of stack
|
||||||
@ -166,7 +173,9 @@ public class HDF5Reader implements PlugIn {
|
|||||||
imp = new CompositeImage(imp, CompositeImage.COMPOSITE);
|
imp = new CompositeImage(imp, CompositeImage.COMPOSITE);
|
||||||
imp.setOpenAsHyperStack(true);
|
imp.setOpenAsHyperStack(true);
|
||||||
imp.resetDisplayRange();
|
imp.resetDisplayRange();
|
||||||
imp.show();
|
if(showImage) {
|
||||||
|
imp.show();
|
||||||
|
}
|
||||||
|
|
||||||
} else if (numberOfDimensions == 4 && dimensions[3] == 3) {
|
} else if (numberOfDimensions == 4 && dimensions[3] == 3) {
|
||||||
logger.info("3D RGB Image");
|
logger.info("3D RGB Image");
|
||||||
@ -194,7 +203,9 @@ public class HDF5Reader implements PlugIn {
|
|||||||
imp = new CompositeImage(imp, CompositeImage.COMPOSITE);
|
imp = new CompositeImage(imp, CompositeImage.COMPOSITE);
|
||||||
imp.setOpenAsHyperStack(true);
|
imp.setOpenAsHyperStack(true);
|
||||||
imp.resetDisplayRange();
|
imp.resetDisplayRange();
|
||||||
imp.show();
|
if(showImage) {
|
||||||
|
imp.show();
|
||||||
|
}
|
||||||
|
|
||||||
} else if (numberOfDimensions == 4) {
|
} else if (numberOfDimensions == 4) {
|
||||||
logger.info("4D Image (HyperVolume)");
|
logger.info("4D Image (HyperVolume)");
|
||||||
@ -224,7 +235,9 @@ public class HDF5Reader implements PlugIn {
|
|||||||
imp.setDimensions(1, (int) dimensions[1], (int) dimensions[0]);
|
imp.setDimensions(1, (int) dimensions[1], (int) dimensions[0]);
|
||||||
imp.setOpenAsHyperStack(true);
|
imp.setOpenAsHyperStack(true);
|
||||||
imp.resetDisplayRange();
|
imp.resetDisplayRange();
|
||||||
imp.show();
|
if(showImage) {
|
||||||
|
imp.show();
|
||||||
|
}
|
||||||
|
|
||||||
} else if (numberOfDimensions == 3 && dimensions[2] == 3) {
|
} else if (numberOfDimensions == 3 && dimensions[2] == 3) {
|
||||||
logger.info("2D RGB Image");
|
logger.info("2D RGB Image");
|
||||||
@ -247,7 +260,9 @@ public class HDF5Reader implements PlugIn {
|
|||||||
imp = new CompositeImage(imp, CompositeImage.COMPOSITE);
|
imp = new CompositeImage(imp, CompositeImage.COMPOSITE);
|
||||||
imp.setOpenAsHyperStack(true);
|
imp.setOpenAsHyperStack(true);
|
||||||
imp.resetDisplayRange();
|
imp.resetDisplayRange();
|
||||||
imp.show();
|
if(showImage) {
|
||||||
|
imp.show();
|
||||||
|
}
|
||||||
|
|
||||||
} else if (numberOfDimensions == 3) {
|
} else if (numberOfDimensions == 3) {
|
||||||
logger.info("3D Image");
|
logger.info("3D Image");
|
||||||
@ -322,7 +337,9 @@ public class HDF5Reader implements PlugIn {
|
|||||||
stacks.add(stack);
|
stacks.add(stack);
|
||||||
ImagePlus imp = new ImagePlusHDF5(filename + " " + datasetName, stack);
|
ImagePlus imp = new ImagePlusHDF5(filename + " " + datasetName, stack);
|
||||||
imp.resetDisplayRange();
|
imp.resetDisplayRange();
|
||||||
imp.show();
|
if(showImage) {
|
||||||
|
imp.show();
|
||||||
|
}
|
||||||
|
|
||||||
} else if (numberOfDimensions == 2) {
|
} else if (numberOfDimensions == 2) {
|
||||||
logger.info("2D Image");
|
logger.info("2D Image");
|
||||||
@ -335,7 +352,9 @@ public class HDF5Reader implements PlugIn {
|
|||||||
|
|
||||||
ImagePlus imp = new ImagePlus(filename + " " + datasetName, stack);
|
ImagePlus imp = new ImagePlus(filename + " " + datasetName, stack);
|
||||||
imp.resetDisplayRange();
|
imp.resetDisplayRange();
|
||||||
imp.show();
|
if(showImage) {
|
||||||
|
imp.show();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
IJ.showStatus("Variable Dimension " + numberOfDimensions + " not supported");
|
IJ.showStatus("Variable Dimension " + numberOfDimensions + " not supported");
|
||||||
|
Reference in New Issue
Block a user