Skip to content

Commit b3cca83

Browse files
committed
Cleaned up
Cleaned up from old TODOS etc. +added explanation to solution
1 parent 6ff2f46 commit b3cca83

File tree

8 files changed

+11
-27
lines changed

8 files changed

+11
-27
lines changed

src/main/java/cz/it4i/fiji/datastore/rest_client/WriteSequenceToN5.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public static void writeN5File(final AbstractSequenceDescription<?, ?, ?> seq,
181181
int numCompletedTasks = 0;
182182

183183
final ExecutorService executorService = Executors.newFixedThreadPool( numCellCreatorThreads );
184-
//TODO FIND N5 WRITER AND MAKE HIM CHANGABLE
184+
185185
try (N5Writer n5 = writerSupplier.get()) {
186186
// write image data for all views
187187
final int numTimepoints = timepointIds.size();

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ public void run() {
150150
} catch (IOException | ModuleException e) {
151151
myLogger.error("Some error accessing the reference service and dataset: "+e.getMessage());
152152
} catch (ExecutionException e) {
153-
e.printStackTrace();
153+
myLogger.error(e.getMessage());
154+
154155
} catch (InterruptedException e) {
155156
//dialog interrupted, do nothing special...
156157
myLogger.error("eee!? "+e.getMessage());

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,17 @@ 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-
//TODO totally random solution
125+
//This solution was chosen so that there was no need to change the DatasetDTO object,
126+
// so the information about the dataset type is placed after the compression with the delimiter '/',
127+
// according to which it is then divided in the registerServiceEndpoint and only the actual value of the compression is stored in the compression.
128+
// datasetType is then normally stored in the Dataset class and is used to select a suitable handler.
129+
// The most likely solution would be to add the datasetType attribute to the DatasetDTO class, but unfortunately this was not entirely within my power.
126130
if(this.datasetType.equals("Zarr")) {
127-
di.compression = this.compression.equals("none") ? "raw" : this.compression + "|Zarr";
131+
di.compression = this.compression.equals("none") ? "raw" : this.compression + "/Zarr";
128132
}
129133
else
130134
{
131-
di.compression = this.compression.equals("none") ? "raw" : this.compression + "|N5";
135+
di.compression = this.compression.equals("none") ? "raw" : this.compression + "/N5";
132136
}
133137
di.versions = Collections.emptyList();
134138
di.resolutionLevels = new ArrayList<>(numberOfAllResLevels);

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public void run() {
137137
di.channelResolution = new DatasetInfo.ResolutionWithOwnUnit(channel_res, channel_unit);
138138
di.angleResolution = new DatasetInfo.ResolutionWithOwnUnit(angle_res, angle_unit);
139139

140-
//di.compression = this.compression.equals("none") ? "raw" : this.compression;
141140
if(this.datasetType.equals("Zarr")) {
142141
di.compression = this.compression.equals("none") ? "raw" : this.compression + "/Zarr";
143142
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ public void run() {
4545
myLogger = mainLogger.subLogger("HPC CreateDataset", LogLevel.INFO);
4646

4747
try {
48-
String add="/datasets";
49-
final HttpURLConnection connection = (HttpURLConnection)new URL("http://"+this.url+add).openConnection();
48+
final HttpURLConnection connection = (HttpURLConnection)new URL("http://"+this.url+"/datasets").openConnection();
5049
connection.setRequestMethod("POST");
5150
connection.setRequestProperty("Content-Type","application/json");
5251
connection.setDoOutput(true);

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

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/main/java/cz/it4i/fiji/legacy/common/ImagePlusDialogHandler.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ protected void updateSpatialRanges() {
105105
/** updates currentResLevel given the current choice in resolutionLevelsAsStr,
106106
sets currentResLevel to null when resolutionLevelsAsStr is not valid */
107107
protected void matchResLevel() {
108-
//TODO CLEAR
109108
myLogger.info("going to match against: "+resolutionLevelsAsStr);
110-
System.out.println(resolutionLevelsAsStr);
111109
int i = 0;
112110
while (i < di.resolutionLevels.size()) {
113111
DatasetInfo.ResolutionLevel l = di.resolutionLevels.get(i);

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

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

35-
3635
/** a common label provider with default fallback response/label */
3736
public static final String NO_LABEL_MSG = "(no label is attached)";
3837
public String getLabel() {

0 commit comments

Comments
 (0)