Mouse-Imaging-Centre / pydpiper

Python code for flexible pipeline control
Other
25 stars 10 forks source link

Make the specification of --nuc/--no-nuc and --inormalize/--no-inormalize mandatory #159

Open mcvaneede opened 9 years ago

mcvaneede commented 9 years ago

When you run a bootstrap model, you are running a pipeline without a mask. This means that the non uniformity correction will be suboptimal and intensity normalization can fail altogether (for instance when there is too much blank background, then the resulting intensities can be inverted/crazy small or large).

Still, depending on what kind of input data you provide the pipeline with (e.g. cutouts of the hippocampus), you might still want to run these options. The code should explicitly tell you to specify these two options when running a bootstrap pipeline so you know what you're doing.

bcdarwin commented 9 years ago

Does anyone know the reason for the intensities becoming inverted? I'm seeing this in a couple files in a pipeline, perhaps related to the background issue.

gdevenyi commented 9 years ago

As I understand it, nu_correct makes several assumptions about the statistics of the image and background, and sometimes those are violated which results in some odd "corrections" being applied.

I've seen deep inside some of the minc-toolkit pipeline tools that "backgrounds" are corrected to be non-zero before certain tools are run, I suspect that may be to fix such issues.

bcdarwin commented 9 years ago

Fixed in e12a692e83.

mcvaneede commented 9 years ago

I think what would actually be better is to document somewhere (either in the help or in the overall pydpiper documentation) that running pipelines with a target without a mask (can be all options: initial model, bootstrap model and lsq6 target) can lead to issues with non uniformity correction and intensity normalization.

It is convenient that you don't always have to specify some parameters that you'll want to run in 90% of the cases.

gdevenyi commented 9 years ago

@mcvaneede Is there any publications around that compare masked and unmasked n3/n4? I've heard this statement before and I can't find anything to back it up so far.

mcvaneede commented 9 years ago

Not that I know of... I was always under the impression that using a good mask was the best practice, but this question is probably best directed at the minc-users list.

gdevenyi commented 9 years ago

FYI, found a paper examining masking in N3 http://dx.doi.org.libaccess.lib.mcmaster.ca/10.1016/j.neuroimage.2007.10.026

gdevenyi commented 9 years ago

Whoops bad link http://dx.doi.org/10.1016/j.neuroimage.2007.10.026