Skip to content

Migrate processes and pipelines to Capsul v3 #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft
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 examples/scripts/column-regions/column-regions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

python -m capsul highres_cortex.capsul.traverses \
python -m capsul run highres_cortex.capsul.traverses \
classif=../classif.nii.gz \
goal_traverse_diameter=1.0 \
verbosity=1 \
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/dist/distmaps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

python -m capsul highres_cortex.capsul.processes.Distmaps \
python -m capsul run highres_cortex.capsul.processes.Distmaps \
classif=../classif.nii.gz \
distwhite=distwhite.nii.gz \
distCSF=distCSF.nii.gz \
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/heat/heat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

python -m capsul highres_cortex.capsul.processes.Laplacian \
python -m capsul run highres_cortex.capsul.processes.Laplacian \
classif=../classif.nii.gz \
verbosity=1 \
laplace_field=heat.nii.gz
2 changes: 1 addition & 1 deletion examples/scripts/isovolume/isovolume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

python -m capsul highres_cortex.capsul.isovolume \
python -m capsul run highres_cortex.capsul.isovolume \
classif=../classif.nii.gz \
verbosity=1 \
advection_step_size=0.05 \
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/laplace-euclidean/laplace-euclidean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

python -m capsul highres_cortex.capsul.thickness_adv \
python -m capsul run highres_cortex.capsul.thickness_adv \
classif=../classif.nii.gz \
advection_step_size=0.05 \
verbosity=1 \
Expand Down
2 changes: 1 addition & 1 deletion examples/scripts/upwind-euclidean/upwind-euclidean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.

python -m capsul highres_cortex.capsul.thickness_upw \
python -m capsul run highres_cortex.capsul.thickness_upw \
classif=../classif.nii.gz \
verbosity=1 \
thickness_image=total-length.nii.gz \
Expand Down
34 changes: 34 additions & 0 deletions python/highres_cortex/capsul/filtered_sumcurvs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"type": "custom_pipeline",
"name": "filtered_sumcurvs",
"definition": {
"export_parameters": false,
"doc": "Compute the filtered sum of principal curvatures of isophote surfaces. This is equivalent to computing the divergence of the normalized gradient of the input scalar field. Note that a Gaussian smoothing of width sigma is first applied to the input image, in order to limit the appearance of local high curvature values (e.g. due to the discontinuity of second-order derivative at the borders of the cortex).",
"executables": {
"smoothing": {
"definition": "highres_cortex.capsul.processes.GaussianSmoothing",
"type": "process"
},
"sumcurvs": {
"definition": "highres_cortex.capsul.processes.IsoCurvature",
"type": "process",
"parameters": {
"mode": "sum"
}
}
},
"parameters": {
"sigma": 1.0,
"verbosity": 1
},
"links": [
"input->smoothing.input_image",
"sigma->smoothing.zsigma",
"sigma->smoothing.xsigma",
"sigma->smoothing.ysigma",
"verbosity->sumcurvs.verbosity",
"smoothing.output_image->sumcurvs.input_image",
"sumcurvs.output_image->output"
]
}
}
70 changes: 0 additions & 70 deletions python/highres_cortex/capsul/filtered_sumcurvs.xml

This file was deleted.

93 changes: 93 additions & 0 deletions python/highres_cortex/capsul/isovolume.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"type": "custom_pipeline",
"name": "isovolume",
"definition": {
"export_parameters": false,
"doc": "Compute equivolumetric depth",
"executables": {
"laplace": {
"definition": "highres_cortex.capsul.processes.Laplacian",
"type": "process"
},
"filtered_sumcurvs": {
"definition": "highres_cortex.capsul.filtered_sumcurvs",
"type": "process"
},
"binarize_cortex": {
"definition": "highres_cortex.capsul.processes.BinarizeCortex",
"type": "process"
},
"advect_toward_pial": {
"definition": "highres_cortex.capsul.processes.AdvectTubesAlongGradient",
"type": "process",
"parameters": {
"upfield": true,
"domain_type": "interpolated"
}
},
"advect_toward_white": {
"definition": "highres_cortex.capsul.processes.AdvectTubesAlongGradient",
"type": "process",
"parameters": {
"domain_type": "interpolated",
"upfield": false
}
},
"total_tube_volume": {
"definition": "highres_cortex.capsul.processes.ImageArithmetic2Inputs",
"type": "process",
"parameters": {
"formula": "I1 + I2"
}
},
"pial_volume_fraction": {
"definition": "highres_cortex.capsul.processes.ImageArithmetic2Inputs",
"type": "process",
"parameters": {
"formula": "I1 / I2"
}
},
"postprocess": {
"definition": "highres_cortex.capsul.processes.PostProcessEquivolumetricDepth",
"type": "process"
}
},
"parameters": {
"advection_max_dist": 6.0,
"advection_step_size": 0.03,
"smoothing_sigma": 1.0,
"laplace_precision": 0.001,
"laplace_typical_cortical_thickness": 3.0,
"verbosity": 1
},
"links": [
"classif->laplace.classif",
"classif->postprocess.classif",
"classif->binarize_cortex.classif",
"verbosity->laplace.verbosity",
"verbosity->filtered_sumcurvs.verbosity",
"verbosity->advect_toward_pial.verbosity",
"verbosity->advect_toward_white.verbosity",
"laplace_precision->laplace.precision",
"laplace_typical_cortical_thickness->laplace.typical_cortical_thickness",
"smoothing_sigma->filtered_sumcurvs.sigma",
"advection_step_size->advect_toward_pial.step_size",
"advection_step_size->advect_toward_white.step_size",
"advection_max_dist->advect_toward_pial.max_dist",
"advection_max_dist->advect_toward_white.max_dist",
"laplace.laplace_field->filtered_sumcurvs.input",
"laplace.laplace_field->advect_toward_pial.grad_field",
"laplace.laplace_field->advect_toward_white.grad_field",
"filtered_sumcurvs.output->advect_toward_white.divergence",
"filtered_sumcurvs.output->advect_toward_pial.divergence",
"binarize_cortex.output_image->advect_toward_white.domain",
"binarize_cortex.output_image->advect_toward_pial.domain",
"advect_toward_pial.output_volumes->total_tube_volume.input_image_1",
"advect_toward_pial.output_volumes->pial_volume_fraction.input_image_1",
"advect_toward_white.output_volumes->total_tube_volume.input_image_2",
"total_tube_volume.output_image->pial_volume_fraction.input_image_2",
"pial_volume_fraction.output_image->postprocess.input_image",
"postprocess.output_image->equivolumetric_depth"
]
}
}
132 changes: 0 additions & 132 deletions python/highres_cortex/capsul/isovolume.xml

This file was deleted.

Loading