Write Image to Omero Server
Posted: Thu May 17, 2018 6:48 pm
Hi there,
I'm following the example here to write my code to write an image back to Omero:
https://github.com/openmicroscopy/openmicroscopy/blob/v5.4.6/examples/Training/matlab/CreateImage.m
1. I didn't see in here how an Matlab image is converted to an Omero image object or byte array. Please let me know how to get that done.
2. While reading the docs, seems like this line here only create the metadata.
Then, why is later in the code:
The above lines are used to get the pixels? Won't this getting empty or null?
3.
This line here seems to only work for unit16 for some reason...
I'm following the example here to write my code to write an image back to Omero:
https://github.com/openmicroscopy/openmicroscopy/blob/v5.4.6/examples/Training/matlab/CreateImage.m
1. I didn't see in here how an Matlab image is converted to an Omero image object or byte array. Please let me know how to get that done.
2. While reading the docs, seems like this line here only create the metadata.
- Code: Select all
idNew = pixelsService.createImage(sizeX, sizeY, sizeZ, sizeT,...
toJavaList(0:sizeC-1, 'java.lang.Integer'), pixelType, name, description);
Then, why is later in the code:
- Code: Select all
imageNew = getImages(session, idNew.getValue());
...
...
pixels = imageNew.getPrimaryPixels();
The above lines are used to get the pixels? Won't this getting empty or null?
3.
- Code: Select all
range = cast(1: intmax(type) / sizeX : intmax(type), type);
This line here seems to only work for unit16 for some reason...