Skip to content

Commit

Permalink
fix merge conflicts and remove some SOP statements
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoKiaru committed May 7, 2021
2 parents 1cc8e87 + 89d232f commit fcf6a68
Show file tree
Hide file tree
Showing 14 changed files with 628 additions and 573 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@

<bigdataviewer-selector.version>0.1.8</bigdataviewer-selector.version>
<bigvolumeviewer.version>0.2.0</bigvolumeviewer.version>
<mastodon.version>1.0.0-beta-16</mastodon.version>
<bigdataviewer-spimdata-extras.version>0.1.0</bigdataviewer-spimdata-extras.version>
<mastodon.version>1.0.0-beta-17</mastodon.version>
<bigdataviewer-spimdata-extras.version>0.1.1</bigdataviewer-spimdata-extras.version>
<reflections.version>0.9.11</reflections.version>

<!-- package version below are determined by the parent pom but need to be upgraded -->
Expand Down
28 changes: 28 additions & 0 deletions src/main/java/sc/fiji/bdvpg/PlaygroundPrefs.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
/*-
* #%L
* BigDataViewer-Playground
* %%
* Copyright (C) 2019 - 2021 Nicolas Chiaruttini, EPFL - Robert Haase, MPI CBG - Christian Tischer, EMBL
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* #L%
*/
package sc.fiji.bdvpg;

public abstract class PlaygroundPrefs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public JsonElement serialize(AbstractSpimData asd,
@Override
public AbstractSpimData deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
String datalocation = jsonElement.getAsJsonObject().get("datalocation").getAsString();
System.out.println("Deserialization of "+datalocation);
//System.out.println("Deserialization of "+datalocation);
if (datalocation.endsWith(".qpath")) {
System.err.println("qpath project unhandled in deserialization!");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public SourceAndConverterAdapter(sc.fiji.bdvpg.services.SourceAndConverterAdapte
try {
ISourceAdapter adapter = pi.createInstance();
adapter.setSacSerializer(sacSerializer);
System.out.println("adapter.getSourceClass()= "+adapter.getSourceClass());
//System.out.println("adapter.getSourceClass()= "+adapter.getSourceClass());
sourceSerializers.put(adapter.getSourceClass(), adapter);
sourceSerializersFromName.put(adapter.getSourceClass().getName(), adapter);
} catch (InstantiableException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public class BdvHandlePostprocessor extends AbstractPostprocessorPlugin {
@Parameter
SourceAndConverterBdvDisplayService bsds;

public static Consumer<String> log = (str) -> System.out.println(BdvHandlePostprocessor.class.getSimpleName()+":"+str);
public static Consumer<String> log = (str) -> {};//System.out.println(BdvHandlePostprocessor.class.getSimpleName()+":"+str);

@Override
public void process(Module module) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class BvvHandlePostprocessor extends AbstractPostprocessorPlugin {
@Parameter
GuavaWeakCacheService cacheService;

public static Consumer<String> log = (str) -> System.out.println(BvvHandlePostprocessor.class.getSimpleName()+":"+str);
public static Consumer<String> log = (str) -> {};//System.out.println(BvvHandlePostprocessor.class.getSimpleName()+":"+str);

@Override
public void process(Module module) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class SpimDataPostprocessor extends AbstractPostprocessorPlugin {
@Parameter
SourceAndConverterService bss;

public static Consumer<String> log = (str) -> System.out.println( SpimDataPostprocessor.class.getSimpleName()+":"+str);
public static Consumer<String> log = (str) -> {};//System.out.println( SpimDataPostprocessor.class.getSimpleName()+":"+str);

public static Consumer<String> errlog = (str) -> System.err.println( SpimDataPostprocessor.class.getSimpleName()+":"+str);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void setDefaultBdvSupplier(IBdvSupplier bdvSupplier) {
log.accept(" --- Serializing to save default bdv window of class "+bdvSupplier.getClass().getSimpleName());
Gson gson = ScijavaGsonHelper.getGson(ctx, true);
String bdvSupplierSerialized = gson.toJson(bdvSupplier, IBdvSupplier.class);
System.out.println("Bdv Supplier serialized into : "+bdvSupplierSerialized);
log.accept("Bdv Supplier serialized into : "+bdvSupplierSerialized);
// Saved in prefs for next session
Prefs.set("bigdataviewer.playground.supplier", bdvSupplierSerialized);
}
Expand All @@ -139,10 +139,10 @@ public BdvHandle getNewBdv() {
bdvSupplier = gson.fromJson(bdvSupplierJson, IBdvSupplier.class);
} catch (Exception e) {
e.printStackTrace();
System.err.println("Restoring default bdv supplier");
errlog.accept("Restoring default bdv supplier");
bdvSupplier = new DefaultBdvSupplier(new SerializableBdvOptions());
String bdvSupplierSerialized = gson.toJson(bdvSupplier, IBdvSupplier.class);
System.out.println("Bdv Supplier serialized into : "+bdvSupplierSerialized);
log.accept("Bdv Supplier serialized into : "+bdvSupplierSerialized);
// Saved in prefs for next session
Prefs.set("bigdataviewer.playground.supplier", bdvSupplierSerialized);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ public synchronized void register(AbstractSpimData asd) {
this.register(setupIdToSourceAndConverter.values()); // Necessary ? Yes!

setupIdToSourceAndConverter.keySet().forEach(id -> {
System.out.println("id = "+id);
linkToSpimData(setupIdToSourceAndConverter.get(id), asd, id);
});

Expand Down Expand Up @@ -542,7 +541,7 @@ public static String getCommandName(Class<? extends Command> c) {
void registerDefaultActions() {
this.registerAction("Display names", (srcs) -> {
for (SourceAndConverter src:srcs){
System.out.println(src.getSpimSource().getName());
log.accept(src.getSpimSource().getName());
}});

context().getService(PluginService.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,20 +269,20 @@ public static LinkedList<SourceAndConverter> getListToRootSourceAndConverter(Sou
DefaultMutableTreeNode current = nodeSac;

while (current.getChildCount() > 0) {
System.out.println(">>>>");
//System.out.println(">>>>");
current = (DefaultMutableTreeNode) current.getFirstChild();
if (current.getUserObject() instanceof RenamableSourceAndConverter) {

System.out.println("RSAC");
//System.out.println("RSAC");
chain.add(((RenamableSourceAndConverter) (current.getUserObject())).sac);
System.out.println("Renamable SourceAndConverter found");
System.out.println(">"+chain.getLast());
//System.out.println("Renamable SourceAndConverter found");
//System.out.println(">"+chain.getLast());
} else {
System.out.println("NO RSAC");
System.out.println("RenamableSourceAndConverter not contained " +
"in first node of inspector result");
System.out.println("Class found = "+current.getUserObject().getClass().getSimpleName());
System.out.println("Object found = "+current.getUserObject());
//System.out.println("NO RSAC");
//System.out.println("RenamableSourceAndConverter not contained " +
// "in first node of inspector result");
//System.out.println("Class found = "+current.getUserObject().getClass().getSimpleName());
//System.out.println("Object found = "+current.getUserObject());

//return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void run() {

Gson gson = new Gson();
JsonArray rawSacsArray = gson.fromJson(fileReader, JsonArray.class);
System.out.println(rawSacsArray.size());
//System.out.println(rawSacsArray.size());

for (int i = 0;i<rawSacsArray.size();i++) {
if (rawSacsArray.get(i).isJsonObject()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
/*-
* #%L
* BigDataViewer-Playground
* %%
* Copyright (C) 2019 - 2021 Nicolas Chiaruttini, EPFL - Robert Haase, MPI CBG - Christian Tischer, EMBL
* %%
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* #L%
*/
package sc.fiji.bdvpg.sourceandconverter.importer;

import bdv.SpimSource;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void run() {
try {

if (context!=null) {
System.out.println(" Handling scijava extra attributes");
//System.out.println(" Handling scijava extra attributes");
// We can handle the extra attributes, see {@link IEntityHandlerService}
Map<Class<? extends Entity>, EntityHandler> entityClassToHandler = new HashMap<>();

Expand Down
Loading

0 comments on commit fcf6a68

Please sign in to comment.