Skip to content

Commit 4c81d35

Browse files
committed
nvm
1 parent 31b0fc6 commit 4c81d35

File tree

4 files changed

+22
-6
lines changed

4 files changed

+22
-6
lines changed

src/main/java/cz/it4i/fiji/legacy/CreateNewDataset.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,14 @@ public void run() {
122122
di.timepointResolution = new DatasetInfo.ResolutionWithOwnUnit(time_res, time_unit);
123123
di.channelResolution = new DatasetInfo.ResolutionWithOwnUnit(channel_res, channel_unit);
124124
di.angleResolution = new DatasetInfo.ResolutionWithOwnUnit(angle_res, angle_unit);
125-
126-
di.compression = this.compression.equals("none") ? "raw" : this.compression;
127-
125+
//TODO totally random solution
126+
if(this.datasetType.equals("Zarr")) {
127+
di.compression = this.compression.equals("none") ? "raw" : this.compression + "|Zarr";
128+
}
129+
else
130+
{
131+
di.compression = this.compression.equals("none") ? "raw" : this.compression + "|N5";
132+
}
128133
di.versions = Collections.emptyList();
129134
di.resolutionLevels = new ArrayList<>(numberOfAllResLevels);
130135
di.label = label;

src/main/java/cz/it4i/fiji/legacy/CreateNewDatasetFromImage.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ void readParams() {
115115
@Parameter(type = ItemIO.OUTPUT, label="Label of the created dataset:")
116116
public String newDatasetLabel;
117117

118+
@Parameter(label = "DatasetType:", choices = { "N5", "Zarr" })
119+
public String datasetType;
120+
118121
@Override
119122
public void run() {
120123
//logging facility
@@ -134,7 +137,14 @@ public void run() {
134137
di.channelResolution = new DatasetInfo.ResolutionWithOwnUnit(channel_res, channel_unit);
135138
di.angleResolution = new DatasetInfo.ResolutionWithOwnUnit(angle_res, angle_unit);
136139

137-
di.compression = this.compression.equals("none") ? "raw" : this.compression;
140+
//di.compression = this.compression.equals("none") ? "raw" : this.compression;
141+
if(this.datasetType.equals("Zarr")) {
142+
di.compression = this.compression.equals("none") ? "raw" : this.compression + "/Zarr";
143+
}
144+
else
145+
{
146+
di.compression = this.compression.equals("none") ? "raw" : this.compression + "/N5";
147+
}
138148

139149
di.versions = Collections.emptyList();
140150
di.resolutionLevels = new ArrayList<>(numberOfAllResLevels);

src/main/java/cz/it4i/fiji/legacy/CreateNewDatasetFromJSON.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ public void run() {
4848

4949
try {
5050
String add="/datasets";
51-
if(datasetType.equals("Zarr"))
51+
/*if(datasetType.equals("Zarr"))
5252
{
5353
add+="zarr";
54-
}
54+
}*/
5555
final HttpURLConnection connection = (HttpURLConnection)new URL("http://"+this.url+add).openConnection();
5656
connection.setRequestMethod("POST");
5757
connection.setRequestProperty("Content-Type","application/json");

src/main/java/cz/it4i/fiji/rest/util/DatasetInfo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class DatasetInfo {
3232
public List<Integer> versions;
3333
public String label;
3434

35+
3536
/** a common label provider with default fallback response/label */
3637
public static final String NO_LABEL_MSG = "(no label is attached)";
3738
public String getLabel() {

0 commit comments

Comments
 (0)