Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ sphinx:
# Optionally build your docs in additional formats such as PDF
formats: [pdf]
build:
os: ubuntu-20.04
os: "ubuntu-22.04"
tools:
python: '3.11'
python:
Expand Down
3 changes: 2 additions & 1 deletion autoafids/config/snakebids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ resource_urls:

#Stereotaxy models
STN: 'resources/stereotaxy/STN.pkl'
cZI: 'resources/stereotaxy/STN.pkl' #change to czi model but dummy here for testing
cZI: 'resources/stereotaxy/cZI.pkl'
template_fcsv: 'resources/stereotaxy/target_template.fcsv'
cZI_template_fcsv: 'resources/stereotaxy/cZI_target_template.fcsv'

plugins.validator.skip: False
root: results
Expand Down
Binary file added autoafids/resources/stereotaxy/cZI.pkl
Binary file not shown.
5 changes: 5 additions & 0 deletions autoafids/resources/stereotaxy/cZI_target_template.fcsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Markups fiducial file version = 4.11
# CoordinateSystem = RAS
# columns = id,x,y,z,ow,ox,oy,oz,vis,sel,lock,label,desc,associatedNodeID
1,afid1_x,afid1_y,afid1_z,0,0,0,1,1,1,1,1,Predicted Right cZI ,vtkMRMLScalarVolumeNode1
2,afid2_x,afid2_y,afid2_z,0,0,0,1,1,1,1,2,Predicted Left cZI,vtkMRMLScalarVolumeNode1
28 changes: 20 additions & 8 deletions autoafids/workflow/rules/stereotaxy.smk
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
stereotaxy_target = config["stereotaxy"]


def which_input(wildcards):
desc_val = "afidscnn-nnlm" if config.get("detect_mode") == "nnlm" else "afidscnn"
return bids(
root=root,
datatype="afids-cnn",
desc=desc_val,
suffix="afids.fcsv",
**inputs[config["modality"]].wildcards,
)


rule stereotaxy:
input:
afidfcsv=bids(
root=root,
datatype="afids-cnn",
desc=_fcsv_desc,
suffix="afids.fcsv",
**inputs[config["modality"]].wildcards,
),
afidfcsv=which_input,
output:
fcsv_native=bids(
root=root,
Expand All @@ -35,7 +40,14 @@ rule stereotaxy:
params:
model=str(Path(workflow.basedir).parent / config[stereotaxy_target]),
midpoint="PMJ",
target_fcsv=str(Path(workflow.basedir).parent / config["template_fcsv"]),
target_fcsv=str(
Path(workflow.basedir).parent
/ (
config["cZI_template_fcsv"]
if stereotaxy_target == "cZI"
else config["template_fcsv"]
)
),
conda:
"../envs/skimage.yaml"
script:
Expand Down
Loading