Skip to content

Commit

Permalink
Add MapAnnotation in setup script; print out ID in example
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikl committed Jul 3, 2018
1 parent 2261687 commit ab381f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/Training/java/src/training/ReadData.java
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ private void loadMapAnnotations(long imageId) throws Exception {
MapAnnotationData mapAnnotation = (MapAnnotationData) annotation;
List<NamedValue> list = (List<NamedValue>) mapAnnotation
.getContent();
System.out.println("\nMapAnnotation ID: "+mapAnnotation.getId());
for (NamedValue namedValue : list)
System.out.println(namedValue.name + ": " + namedValue.value);
}
Expand Down
5 changes: 5 additions & 0 deletions examples/Training/training_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ touch "test&sizeT=10&sizeZ=5&sizeC=3.fake"
bin/omero import "test&sizeT=10&sizeZ=5&sizeC=3.fake" > image_import.log 2>&1
imageid=$(sed -n -e 's/^Image://p' image_import.log)

# Add a Map annotation
MAP=$(bin/omero obj new MapAnnotation)
bin/omero obj map-set $MAP mapValue testkey testvalue
bin/omero obj new ImageAnnotationLink parent=$imageid child=$MAP

# Create screen/plate
screen=$(bin/omero obj new Screen name='Screen')
plate=$(bin/omero obj new Plate name='Plate')
Expand Down

0 comments on commit ab381f2

Please sign in to comment.