diff --git a/data/0.3.0/images/prospr-6dpf-1-whole-ref-SPM.xml b/data/0.3.0/images/prospr-6dpf-1-whole-ref-SPM.xml index 37d5e722a2e69d0d9f7c783ef440fcc690a3919f..889b518d6e1bcc5bf6c71da2e1ad34391dacfb4b 100644 --- a/data/0.3.0/images/prospr-6dpf-1-whole-ref-SPM.xml +++ b/data/0.3.0/images/prospr-6dpf-1-whole-ref-SPM.xml @@ -2,7 +2,7 @@ <BasePath type="relative">.</BasePath> <SequenceDescription> <ImageLoader format="bdv.hdf5"> - <hdf5 type="relative">../rawdata/prospr-6dpf-1-whole-ref-SPM.h5</hdf5> + <hdf5 type="relative">../../rawdata/prospr-6dpf-1-whole-ref-SPM.h5</hdf5> </ImageLoader> <ViewSetups> <ViewSetup> diff --git a/data/0.3.0/misc/bdv_server.txt b/data/0.3.0/misc/bdv_server.txt index acc8bfbe226468b2bc515a6e9371005de6597e3c..7b5323e66949975083bd11671edbbd3a5daca3bb 100644 --- a/data/0.3.0/misc/bdv_server.txt +++ b/data/0.3.0/misc/bdv_server.txt @@ -207,9 +207,12 @@ prospr-6dpf-1-whole-segmented-RestOfAnimal ../images/prospr-6dpf-1-whole-segment prospr-6dpf-1-whole-segmented-Stomodeum ../images/prospr-6dpf-1-whole-segmented-Stomodeum.xml prospr-6dpf-1-whole-segmented-VNC ../images/prospr-6dpf-1-whole-segmented-VNC.xml prospr-6dpf-1-whole-six12-MED ../images/prospr-6dpf-1-whole-six12-MED.xml +prospr-6dpf-1-whole-ref-SPM ../images/prospr-6dpf-1-whole-ref-SPM.xml sbem-6dpf-1-whole-segmented-chromatin-labels ../segmentations/sbem-6dpf-1-whole-segmented-chromatin-labels.xml sbem-6dpf-1-whole-segmented-tissue-labels ../segmentations/sbem-6dpf-1-whole-segmented-tissue-labels.xml sbem-6dpf-1-whole-segmented-muscle ../segmentations/sbem-6dpf-1-whole-segmented-muscle.xml sbem-6dpf-1-whole-segmented-cells-labels ../segmentations/sbem-6dpf-1-whole-segmented-cells-labels.xml sbem-6dpf-1-whole-segmented-nuclei-labels ../segmentations/sbem-6dpf-1-whole-segmented-nuclei-labels.xml sbem-6dpf-1-whole-segmented-cilia-labels ../segmentations/sbem-6dpf-1-whole-segmented-cilia-labels.xml +sbem-6dpf-1-whole-segmented-ariande-neuropil ../segmentations/sbem-6dpf-1-whole-segmented-ariande-neuropil.xml +sbem-6dpf-1-whole-segmented-cats-neuropil ../segmentations/sbem-6dpf-1-whole-segmented-cats-neuropil.xml diff --git a/data/0.3.0/segmentations/sbem-6dpf-1-whole-segmented-ariande-neuropil.xml b/data/0.3.0/segmentations/sbem-6dpf-1-whole-segmented-ariande-neuropil.xml index 2bab0950e8339c8318907499d656e084b52ebe4d..5f99490615eb5484a667ec215aac44b8b0906e50 100644 --- a/data/0.3.0/segmentations/sbem-6dpf-1-whole-segmented-ariande-neuropil.xml +++ b/data/0.3.0/segmentations/sbem-6dpf-1-whole-segmented-ariande-neuropil.xml @@ -2,7 +2,7 @@ <BasePath type="relative">.</BasePath> <SequenceDescription> <ImageLoader format="bdv.hdf5"> - <hdf5 type="relative">../rawdata/sbem-6dpf-1-whole-segmented-ariande-neuropil.h5</hdf5> + <hdf5 type="relative">../../rawdata/sbem-6dpf-1-whole-segmented-ariande-neuropil.h5</hdf5> </ImageLoader> <ViewSetups> <ViewSetup> diff --git a/data/0.3.0/segmentations/sbem-6dpf-1-whole-segmented-cats-neuropil.xml b/data/0.3.0/segmentations/sbem-6dpf-1-whole-segmented-cats-neuropil.xml index 008437aec53955911e84b481e2bbefdb5778cdb6..270aa820ef864a3cfe0a810254246aba22b02870 100644 --- a/data/0.3.0/segmentations/sbem-6dpf-1-whole-segmented-cats-neuropil.xml +++ b/data/0.3.0/segmentations/sbem-6dpf-1-whole-segmented-cats-neuropil.xml @@ -2,7 +2,7 @@ <BasePath type="relative">.</BasePath> <SequenceDescription> <ImageLoader format="bdv.hdf5"> - <hdf5 type="relative">../rawdata/sbem-6dpf-1-whole-segmented-cats-neuropil.h5</hdf5> + <hdf5 type="relative">../../rawdata/sbem-6dpf-1-whole-segmented-cats-neuropil.h5</hdf5> </ImageLoader> <ViewSetups> <ViewSetup> diff --git a/scripts/files/bdv_server.py b/scripts/files/bdv_server.py index 39eb1b0c9edfb3e33150f423a56fa0bc45b00e6b..df405153ba8d31c9bda0f54192613366d925d613 100644 --- a/scripts/files/bdv_server.py +++ b/scripts/files/bdv_server.py @@ -9,11 +9,12 @@ def add_to_bdv_config(name, path, bdv_config, relative_paths, ref_dir): h5path = get_h5_path_from_xml(path, return_absolute_path=True) if not os.path.exists(h5path): msg = 'Path to h5-file in xml does not exist - %s, %s' % (path, h5path) - return RuntimeError(msg) + raise RuntimeError(msg) if relative_paths: path = os.path.relpath(path, ref_dir) bdv_config[name] = path + return bdv_config def make_bdv_server_file(folder, out_path, relative_paths=True): @@ -29,13 +30,15 @@ def make_bdv_server_file(folder, out_path, relative_paths=True): if name in privates: continue path = os.path.join(folder, 'images', '%s.xml' % name) - add_to_bdv_config(name, path, bdv_config, relative_paths, ref_dir) + bdv_config = add_to_bdv_config(name, path, bdv_config, + relative_paths, ref_dir) for name in seg_names: if name in privates: continue path = os.path.join(folder, 'segmentations', '%s.xml' % name) - add_to_bdv_config(name, path, bdv_config, relative_paths, ref_dir) + bdv_config = add_to_bdv_config(name, path, bdv_config, + relative_paths, ref_dir) with open(out_path, 'w') as f: for name, path in bdv_config.items(): diff --git a/scripts/files/copy_helper.py b/scripts/files/copy_helper.py index db30de4a97e791be14afd408dcfe5b0fd6832243..f9fba57dcc55c340aa04af20b1b3bc8c3c146deb 100644 --- a/scripts/files/copy_helper.py +++ b/scripts/files/copy_helper.py @@ -4,6 +4,7 @@ from .xml_utils import copy_xml_with_newpath, get_h5_path_from_xml from .sources import get_image_names, get_segmentation_names, get_segmentations +# TODO double check this def copy_file(xml_in, xml_out): h5path = get_h5_path_from_xml(xml_in, return_absolute_path=True) xml_dir = os.path.split(xml_out)[0]