2 Commits

Author SHA1 Message Date
75e490fa18 Implemented option to hide image when opening 2018-01-24 10:35:52 +01:00
70fa714aac Fixed build instructions 2018-01-24 10:33:54 +01:00
4 changed files with 73 additions and 8 deletions

View File

@ -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.
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
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

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>ch.psi</groupId>
<artifactId>imagej.hdf5</artifactId>
<version>0.11.0</version>
<version>0.12.0</version>
<dependencies>
<dependency>

44
settings.xml Normal file
View 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>

View File

@ -46,7 +46,12 @@ public class HDF5Reader implements PlugIn {
* dataset=/your/path/to/dataset
*
*/
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);
@ -118,7 +123,9 @@ public class HDF5Reader implements PlugIn {
ImagePlus imp = new ImagePlus(filename, stack);
imp.resetDisplayRange();
imp.show();
if(showImage) {
imp.show();
}
stacks.add(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.setOpenAsHyperStack(true);
imp.resetDisplayRange();
imp.show();
if(showImage) {
imp.show();
}
} else if (numberOfDimensions == 4 && dimensions[3] == 3) {
logger.info("3D RGB Image");
@ -194,7 +203,9 @@ public class HDF5Reader implements PlugIn {
imp = new CompositeImage(imp, CompositeImage.COMPOSITE);
imp.setOpenAsHyperStack(true);
imp.resetDisplayRange();
imp.show();
if(showImage) {
imp.show();
}
} else if (numberOfDimensions == 4) {
logger.info("4D Image (HyperVolume)");
@ -224,7 +235,9 @@ public class HDF5Reader implements PlugIn {
imp.setDimensions(1, (int) dimensions[1], (int) dimensions[0]);
imp.setOpenAsHyperStack(true);
imp.resetDisplayRange();
imp.show();
if(showImage) {
imp.show();
}
} else if (numberOfDimensions == 3 && dimensions[2] == 3) {
logger.info("2D RGB Image");
@ -247,7 +260,9 @@ public class HDF5Reader implements PlugIn {
imp = new CompositeImage(imp, CompositeImage.COMPOSITE);
imp.setOpenAsHyperStack(true);
imp.resetDisplayRange();
imp.show();
if(showImage) {
imp.show();
}
} else if (numberOfDimensions == 3) {
logger.info("3D Image");
@ -322,7 +337,9 @@ public class HDF5Reader implements PlugIn {
stacks.add(stack);
ImagePlus imp = new ImagePlusHDF5(filename + " " + datasetName, stack);
imp.resetDisplayRange();
imp.show();
if(showImage) {
imp.show();
}
} else if (numberOfDimensions == 2) {
logger.info("2D Image");
@ -335,7 +352,9 @@ public class HDF5Reader implements PlugIn {
ImagePlus imp = new ImagePlus(filename + " " + datasetName, stack);
imp.resetDisplayRange();
imp.show();
if(showImage) {
imp.show();
}
} else {
IJ.showStatus("Variable Dimension " + numberOfDimensions + " not supported");