KCL-BMEIS / niftyreg

This project contains command line tools to perform rigid, affine and non-linear registration of nifti or analyse images as well as utilities
BSD 3-Clause "New" or "Revised" License
141 stars 42 forks source link

reg_f3d -ln option error #72

Closed taylorwuselman-zz closed 1 year ago

taylorwuselman-zz commented 4 years ago

My research lab has developed Python script utilizing reg_aladin and reg_f3d to perform subsequent linear/non-linear transformations of mouse MR brain image masks to "skull strip" the extraneous brain tissue. I attached the pdf of the paper in case more information is needed about what we are using Nifty Reg for.

However, when downloading the most recent version of NiftyReg on a Windows 10 laptop using a Linux terminal (Ubuntu app) to apply this code, I consistently get the following error.

Segmentation fault (core dumped)

The error occurs on line 57 of the attached Python code (as a .txt; skullstripper_v2.txt) and stems from the _regf3d -ln option, i.e. when ln=0. If ln>0 the code will run, however, our output masks are no longer usable as we do not want to run an optimization for the alignment of a binary mask, we simply want to apply the transform.

Is ln=0 not an option in the most recent release of NiftyReg? If so we would like to know so that we can update our code. Or does this stem from something else related to authorized memory allocation on my device; hence the Segmentation Fault error?

Delora et al. - 2016 - A simple rapid process for semi-automated brain ex.pdf

mmodat commented 1 year ago

reg_resample can be used to apply a known transformation without any optimisation. More details about reg_resample arguments can be found here.