Skip to content

Will cloud-volume support the new Neuroglancer $PROTOCOL://$BUCKET/$DATASET/$LAYER|$FORMAT:? #653

Answered by chourroutm
chourroutm asked this question in Q&A
Discussion options

You must be logged in to vote

Okay, thanks!

As a workaround, would this work?

import re
import cloudvolume

def _legacy_source_url(source_url):
    match = re.match(r'^(.*)\|(.*)\:$', source_url)
    if match:
        protocol_url = match.group(1)
        pipe_format = match.group(2)
        if pipe_format == "neuroglancer-precomputed":
            pipe_format = "precomputed"
        return f"{pipe_format}://{protocol_url}"
    return source_url

vol = cloudvolume.CloudVolume(_legacy_source_url(source.url), parallel=True, progress=True, use_https=True)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@chourroutm
Comment options

Answer selected by chourroutm
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants