WuChanada / StripSkullCT

Extract brain and remove skulls from brain CT and CTA images
BSD 3-Clause "New" or "Revised" License
28 stars 8 forks source link

Undefined function or variable 'dd' #2

Open brosscle opened 1 year ago

brosscle commented 1 year ago

Hi, I am using your code to perform a brain extraction on CT images but I sometimes get stuck with an issue in the SkullStrip function, which is private so I cannot investigate. The error message is : Error in SkullStrip (line 10) Unrecognized function or variable 'dd'

Do you have any hint about how to solve this issue ? Thanks a lot ! Clément

Uni-Summer commented 1 year ago

hey, sorry to bother, but have you solved this error? I just met the same problem. It would help a lot if you could reply. Thanks so much. Best. Ziying

brosscle commented 1 year ago

Hi, If I remember well, it was because the resulting extracted brain was empty, due to an error in the input image (for instance a badly converted nifti image containing a deformed brain or no brain at all). However, since the function is private I couldn't resolve it properly. Hope it will help you ! Best, Clément

Uni-Summer commented 1 year ago

Thanks so much for your reply! If I may ask, have you tried any other skull-stripping algorithms to perform well on CT? As a newbie, your advice can really help me. Best. Ziying

brosscle commented 1 year ago

I tried the "classic" ones for MRI: FSL BET and PCNN3D, but I ended up using this script because I found the result a bit more robust. However those tests took place 3/4 years ago so other algorithms might have emerged, especially deep learning based ones. If I had to do it again, and if no new deep learning algorithm suits me, I would probably try building my own brain extraction tool by taking advantage of the quantitative values of CT. I would probably begin by a thresholding the images between -15 and 150 HU and then apply image processing operations as morphological or "keep largest components" operations. Hope this helps ! Best, Clément

Uni-Summer commented 1 year ago

yes, I also tried FSL BET, and it performs badly in my case. however, this code only suits part of my dataset, it went wrong with some data. And the value of HU has been clipped to [0, 100] before input. Still, thank you so much for your advice, I will try more methods. Best, Ziying