Tool for loading slides and getting slide metadata using openslide
When used outside of caMicroscope/Distro Docker, the BFBridge folder needs to copied to this repository manually. (Not only its contents, but making it a subfolder of this repository)
Uploading is done in chunks due to the generally large size of the files involved. To upload a slide, you must begin, continue, and finish the upload, as noted in the subsections below.
Calling a post to the begin route (http://<service url base>/upload/start) will generate a token and a corresponding empty file in the uploading directory. This token is then used for the continue and finish steps.
Note that a file in the uploading directory can be modified by anyone with the token.
Post filedata encoded in base64 as "data" and the offset as "offset" in a json document in the body to the continue route for the token given (http://<service url base>/upload/continue/<\token>). The data is then written to the temporary file in the uploading directory starting at the given offset, in bytes.
To prevent further modification to the file, call the finish route (http://<service url base>/upload/finish/<\token>) with the destination filename as "filename" in a json document in the body. In most cases where this fails (such as a rejection for a filename being taken), the temporary file is unchanged so a user can simply try again.
Place your images into a directory on your filesystem.
Then use upload.sh to upload the file. Pass your file path as a parameter.
Example: ./upload.sh /path/to/svs/files
See, for example, http://<service url base>/data/one/<slide filename>
This returns the openslide metadata for the given slide.
See, for example http://<service url base>/data/many/["<slide1_filename>", "<slide2_filename>"]
This returns the metadata for each slide.
This tool does not communicate with bindaas/drupal/whatever backend is used for slide metadata. Since these data backends have their own method for posting slide metadata, that should be used. This tool can be used as a service oriented way to get slide metadata to then post to the data backend.