Skip to content
Open
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
7 changes: 6 additions & 1 deletion autoafids/config/snakebids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ parse_args:

--stereotaxy:
help: 'Predict stereotactic target coordinates from output AFIDs. Also supplies AC-PC transform matrix (4x4) in the process.{STN = subthalamic nucelus, cZI = caudal zona incerta}'
choices: ['STN','cZI']
choices: ['STN','cZI', 'fct', 'RN']
default: false
required: false

Expand Down Expand Up @@ -236,8 +236,13 @@ resource_urls:
#Stereotaxy models
STN: 'resources/stereotaxy/STN.pkl'
cZI: 'resources/stereotaxy/cZI.pkl'
fct: 'resources/stereotaxy/fct.pkl'
RN: 'resources/stereotaxy/RN.pkl'

template_fcsv: 'resources/stereotaxy/target_template.fcsv'
cZI_template_fcsv: 'resources/stereotaxy/cZI_target_template.fcsv'
fct_template_fcsv: 'resources/stereotaxy/fct_target_template.fcsv'
RN_template_fcsv: 'resources/stereotaxy/RN_target_template.fcsv'

plugins.validator.skip: False
root: results
Expand Down
Binary file added autoafids/resources/stereotaxy/RN.pkl
Binary file not shown.
5 changes: 5 additions & 0 deletions autoafids/resources/stereotaxy/RN_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,r_RN,Predicted Right RN,vtkMRMLScalarVolumeNode1
2,afid2_x,afid2_y,afid2_z,0,0,0,1,1,1,1,l_RN,Predicted Left RN,vtkMRMLScalarVolumeNode1
Binary file modified autoafids/resources/stereotaxy/cZI.pkl
Binary file not shown.
4 changes: 2 additions & 2 deletions autoafids/resources/stereotaxy/cZI_target_template.fcsv
Original file line number Diff line number Diff line change
@@ -1,5 +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
1,afid1_x,afid1_y,afid1_z,0,0,0,1,1,1,1,r_cZi,Predicted Right cZI ,vtkMRMLScalarVolumeNode1
2,afid2_x,afid2_y,afid2_z,0,0,0,1,1,1,1,l_cZi,Predicted Left cZI,vtkMRMLScalarVolumeNode1
Binary file added autoafids/resources/stereotaxy/fct.pkl
Binary file not shown.
5 changes: 5 additions & 0 deletions autoafids/resources/stereotaxy/fct_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,r_fct,Predicted Right fct ,vtkMRMLScalarVolumeNode1
2,afid2_x,afid2_y,afid2_z,0,0,0,1,1,1,1,l_fct,Predicted Left fct,vtkMRMLScalarVolumeNode1
4 changes: 2 additions & 2 deletions autoafids/resources/stereotaxy/target_template.fcsv
Original file line number Diff line number Diff line change
@@ -1,5 +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 STN ,vtkMRMLScalarVolumeNode1
2,afid2_x,afid2_y,afid2_z,0,0,0,1,1,1,1,2,Predicted Left STN,vtkMRMLScalarVolumeNode1
1,afid1_x,afid1_y,afid1_z,0,0,0,1,1,1,1,r_STN,Predicted Right STN ,vtkMRMLScalarVolumeNode1
2,afid2_x,afid2_y,afid2_z,0,0,0,1,1,1,1,l_STN,Predicted Left STN,vtkMRMLScalarVolumeNode1
2 changes: 1 addition & 1 deletion autoafids/workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ resolution = float(config["res"])

templatet1w = config["templatet1w"]

if config["stereotaxy"] in ["STN", "cZI"]:
if config["stereotaxy"] in ["STN", "cZI", "fct", "RN"]:
stereotaxy_target = config["stereotaxy"]
print("..... Stereotaxy Target Enabled .....")
stereotaxy_enabled = True
Expand Down
17 changes: 15 additions & 2 deletions autoafids/workflow/rules/stereotaxy.smk
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,28 @@ rule stereotaxy:
params:
model=str(Path(workflow.basedir).parent / config[stereotaxy_target]),
midpoint="PMJ",
target=stereotaxy_target,
target_fcsv=str(
Path(workflow.basedir).parent
/ (
config["cZI_template_fcsv"]
if stereotaxy_target == "cZI"
else config["template_fcsv"]
else (
config["fct_template_fcsv"]
if stereotaxy_target == "fct"
else (
config["RN_template_fcsv"]
if stereotaxy_target == "RN"
else config["template_fcsv"]
)
)
)
),
conda:
"../envs/skimage.yaml"
script:
"../scripts/stereotaxy.py"
(
"../scripts/16_afid_stereotaxy.py"
if stereotaxy_target in ["RN", "fct", "cZI"]
else "../scripts/stereotaxy.py"
)
Loading
Loading