Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
platy-browser-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christian Tischer
platy-browser-data
Commits
d8fcd34f
Commit
d8fcd34f
authored
5 years ago
by
Constantin Pape
Browse files
Options
Downloads
Patches
Plain Diff
Add bigdataserver file
parent
d541b89f
No related branches found
No related tags found
1 merge request
!2
Merge versioning and scripts into master
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
make_initial_version.py
+6
-1
6 additions, 1 deletion
make_initial_version.py
scripts/files/__init__.py
+1
-0
1 addition, 0 deletions
scripts/files/__init__.py
scripts/files/bdv_server.py
+35
-0
35 additions, 0 deletions
scripts/files/bdv_server.py
with
42 additions
and
1 deletion
make_initial_version.py
+
6
−
1
View file @
d8fcd34f
...
...
@@ -6,7 +6,7 @@ from shutil import copyfile
from
scripts.files
import
make_folder_structure
from
scripts.export
import
export_segmentation
from
scripts.files
import
copy_xml_with_abspath
,
write_simple_xml
from
scripts.files
import
copy_files_with_pattern
from
scripts.files
import
copy_files_with_pattern
,
make_bdv_server_file
from
scripts.attributes
import
make_nucleus_tables
,
make_cell_tables
...
...
@@ -108,6 +108,11 @@ def make_initial_version():
make_tables
(
folder
)
# make the bdv server file
make_bdv_server_file
([
os
.
path
.
join
(
folder
,
'
images
'
),
os
.
path
.
join
(
folder
,
'
segmentations
'
)],
os
.
path
.
join
(
folder
,
'
misc
'
,
'
bdvserver.txt
'
))
if
__name__
==
'
__main__
'
:
make_initial_version
()
This diff is collapsed.
Click to expand it.
scripts/files/__init__.py
+
1
−
0
View file @
d8fcd34f
...
...
@@ -2,3 +2,4 @@ from .copy_helper import copy_tables, copy_segmentation, copy_static_files
from
.copy_helper
import
copy_files_with_pattern
from
.folders
import
make_folder_structure
from
.xml_utils
import
get_h5_path_from_xml
,
copy_xml_with_abspath
,
write_simple_xml
from
.bdv_server
import
make_bdv_server_file
This diff is collapsed.
Click to expand it.
scripts/files/bdv_server.py
0 → 100644
+
35
−
0
View file @
d8fcd34f
import
os
from
.xml_utils
import
get_h5_path_from_xml
# TODO enable filtering for files by some patter.
# e.g. if we don't want to expose the fib dataset to the public yet
def
make_bdv_server_file
(
folders
,
out_path
):
"""
Make the bigserver config file from
all xmls in folders.
"""
file_list
=
{}
for
folder
in
folders
:
files
=
os
.
listdir
(
folders
)
for
ff
in
files
:
path
=
os
.
path
.
join
(
folder
,
ff
)
# only add xmls
ext
=
os
.
path
.
splitext
(
path
)[
1
]
if
ext
!=
'
.xml
'
:
continue
# make sure that the h5path linked in the xml exists
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
)
name
=
os
.
path
.
splitext
(
ff
)[
0
]
file_list
[
name
]
=
path
with
open
(
out_path
,
'
w
'
)
as
f
:
for
name
,
path
in
file_list
.
items
():
line
=
'
%s
\t
%s
\n
'
%
(
name
,
path
)
f
.
write
(
line
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment