Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.11.0 #48

Merged
merged 14 commits into from
Feb 23, 2023
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ jobs:
GITHUB_TOKEN: ${{ github.token }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Upload to codecov after successful tests
if: ${{ success() }}
run: bash <(curl -s https://codecov.io/bash)
uses: codecov/codecov-action@v3
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 4 additions & 0 deletions .omeroci/test-data
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,20 @@ PROJECT2=$(omero obj new Project name=TestProject2)
DATASET1=$(omero obj new Dataset name=TestDataset description=description)
DATASET2=$(omero obj new Dataset name=TestDatasetImport)
DATASET3=$(omero obj new Dataset name=TestDataset)
DATASET4=$(omero obj new Dataset name=TestDataset4)

omero obj new ProjectDatasetLink parent="$PROJECT1" child="$DATASET1"
omero obj new ProjectDatasetLink parent="$PROJECT1" child="$DATASET2"
omero obj new ProjectDatasetLink parent="$PROJECT2" child="$DATASET3"
omero obj new ProjectDatasetLink parent="$PROJECT1" child="$DATASET4"

IMAGE1=$(omero import --output=ids "$WORKDIR/image1.fake" -T "$DATASET1")
IMAGE2=$(omero import --output=ids "$WORKDIR/image1.fake" -T "$DATASET1")
IMAGE3=$(omero import --output=ids "$WORKDIR/image2.fake" -T "$DATASET1")
IMAGE4=$(omero import --output=ids "$WORKDIR/image1.fake" -T "$DATASET3")

omero obj new DatasetImageLink parent="$DATASET4" child="$IMAGE1"

# import screens
SCREEN1=$(omero obj new Screen name=TestScreen description=description)
SCREEN2=$(omero obj new Screen name=TestScreen2)
Expand Down
25 changes: 21 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ List<DatasetWrapper> datasets = client.getDatasets();
These objects can then be used to retrieve their children:

```java
for(DatasetWrapper dataset:datasets){
for (DatasetWrapper dataset:datasets) {
List<ImageWrapper> images = dataset.getImages(client);
//...
}
Expand Down Expand Up @@ -108,12 +108,29 @@ List<ROIWrapper> rois = image.getROIs(client);
They can also be converted from or to ImageJ Rois:

```java
// The property is a string used to create 3D/4D ROIs in OMERO, by grouping shapes sharing the same value (used to name the ROI)
List<ROIWrapper> omeroRois = ROIWrapper.fromImageJ(ijRois, property);

// The property is a string used to create 3D/4D ROIs in OMERO, by grouping shapes sharing the same value (e.g. local index).
// The ROI name can be set/accessed using the property ROI.ijNameProperty(property).
// The OMERO IDs are available through the property ROI.ijIDProperty(property).
// The ijNameProperty() and ijIDProperty() methods append "_NAME" and "_ID" to the property (respectively).
// By default, the property is "ROI", and thus, the name property is "ROI_NAME" and the ID property, "ROI_ID".
ROIWrapper roi = new ROIWrapper();
roi.setName("ROI name");
roi.addShape(new RectangleWrapper(0, 0, 5, 5));
List<Roi> imagejRois = roi.toImageJ();
String name = imagejRois.get(0).getProperty(ROI.ijNameProperty(property));
String ID = imagejRois.get(0).getProperty(ROI.ijIDProperty(property));

// Conversely ImageJ Rois can be converted to OMERO from ImageJ using "ROIWrapper::fromImageJ"
Roi ijRoi1 = new Roi(1.0, 2.0, 3.0, 4.0);
ijRoi1.setProperty(property, 0);
ijRoi1.setProperty(ROIWrapper.ijNameProperty(property), "Name 1");
Roi ijRoi2 = new Roi(2.0, 3.0, 4.0, 5.0);
ijRoi2.setProperty(property, 1);
ijRoi2.setProperty(ROIWrapper.ijNameProperty(property), "Name 2");
List<Roi> ijRois = new ArrayList(2);
ijRois.add(ijRoi1);
ijRois.add(ijRoi2);
List<ROIWrapper> rois = ROIWrapper.fromImageJ(ijRois);
```

## License
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<groupId>fr.igred</groupId>
<artifactId>simple-omero-client</artifactId>
<version>5.10.0</version>
<version>5.11.0</version>
<packaging>jar</packaging>

<name>Simple OMERO Client</name>
Expand Down
Loading