[MINC-users] Display's "Fill 3D" on the command line?
Andrew Janke
a.janke at gmail.com
Thu Jun 21 16:58:02 EDT 2018
Hi Gabriel,
Not that I am aware of, unless Vlad has written something. Which is
highly likely.
However I think you could do this a round about way with mincmorph (probably)
First binarise the image
$ mincmorph -successive B[floor:ceil] in.mnc ...
Then do Connected Component Labelling (note that the components are
labelled in ascending order of #voxels. Might be useful, might not be
for what you are doing.
$ mincmorph -successive B[floor:ceil]G in.mnc CCL.mnc
Then determine the value at your point
$ value=$(mincextract -nonormalize -ascii -start x,y,z -count 1,1,1 CCL.mnc)
Then use this value with minccalc / mincmorph / mincmath
$ minccalc -expression 'A[0] = $value CCL.mnc mask.mnc
$ mincmorph -successive K[$value:$value] CCL.mnc mask.mnc
$ mincmath -const2 $value $value -clamp ...blah tiddly something,
Hrm perhaps not with mincmath, it's two steps I think.
I suggest mincmorph as you will have complete control over the
structuring element/kernel. See the -kernel option if you don't want
to use one of the standard ones.
ta
a
On Fri, 22 Jun 2018 at 01:07, Gabriel A. Devenyi
<gabriel.devenyi at mcgill.ca> wrote:
>
> Hi minc-users,
>
> I'm wondering if anyone knows of a command/tool which implements Display's
> 3D fill function on the command line.
>
> Ideally, I'd like something like
> ```
> mincfill3d input.mnc <x y z coordinate, in voxel or world> threshold_low
> threshold_high output.mnc
> ```
>
> This function would drop a point at XYZ and then do region filling
> according to the threshold limits (maybe would have an option to specify
> the connectivity type.
>
> Does such a thing exist?
>
> Thanks!
>
> --
> Gabriel A. Devenyi B.Eng. Ph.D.
> Research Computing Associate
> Computational Brain Anatomy Laboratory
> Cerebral Imaging Center
> Douglas Mental Health University Institute
> Affiliate, Department of Psychiatry
> McGill University
> t: 514.761.6131x4781
> e: gabriel.devenyi at mcgill.ca
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users
More information about the MINC-users
mailing list