open-discussion > RE: use the package of MRIcroGL in common python coding and problem about remove haze in scripting
Aug 2, 2020  03:08 AM | Lance Liu
RE: use the package of MRIcroGL in common python coding and problem about remove haze in scripting
Originally posted by Chris Rorden:
By the way, you can always use the Scripting Editor in MRIcroGL as a kind of command line, entering one or more commands at a time. Consider paste this script into the scripting editor and choose Control-R to run the command:
import gl
gl.resetdefaults()
gl.loadimage('spm152')
You can now add one or more commands to change the image (e.g. new instructions are applied to the exisiting state machine). So you could run the command:

gl.minmax(0, 24, 84)

And it will change image intensity without any other effects. You can add effects one at a time. The one special command is gl.resetdefaults(), which sets many settings back to their default settings. You only want to use this at the very start of a script to ensure that all scripts start with in a common state.

Thanks so much for your reply Chris, 
I have tried this, it is very useful. Threrefore I want to use some tools inside the MRIcrogl. The "remove haze and smooth" is of special insterest to me and I want to incorporate the function in my current experiment pipeline coded with python (bash is also good). I tried with the "remove haze and smooth". It will help me to remove the bracing structures in the CT scans of head (the head fixer in CT machine appears in the CT scan).
Could you tell how do you implement that? Did you just use image process tool to keep the largest connected region in the image to achieve that?
Also it will be great if the FSLeye has that function, so I can directely use that tool to remove those unnecessary parts. 
Thanks so much //



window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-172659890-2');




// ]]>

Threaded View

TitleAuthorDate
Lance Liu Jun 26, 2020
Chris Rorden Jun 26, 2020
Lance Liu Jun 28, 2020
Chris Rorden Jun 28, 2020
RE: use the package of MRIcroGL in common python coding and problem about remove haze in scripting
Lance Liu Aug 2, 2020
Chris Rorden Aug 2, 2020
Lance Liu Aug 3, 2020
Chris Rorden Aug 3, 2020
Chris Rorden Jun 28, 2020