Hi,
Now I see what you are trying to do.
There are two points worth mentioning:
- Does it makes sense to have an area around your activation peak
which,
on average, goes further away from the peak just because it is near
the edge of the brain mask? Isn't there another way to normalise for
what you want in your final output? For instance, dividing by the
number
of voxels in the original ROI would normalise counts. It depends on
what your final objective is.
- If you really do want to control the size of the ROI more
sensitively then
you are better off dilating directly from the original peak, rather
than
expanding from the boundary of an already large sphere. This is
because
you have a large surface area of the 5mm sphere and the dilation cannot
distinguish between different points on the surface. However, if you
use a
large kernel directly on a single voxel (your activation peak) then
you can
distinguish between points based on how far they are (to sub-voxel
precision)
away from the original point. For example, taking a one voxel seed
point
in 2mm space and dilating by spheres of radii 1,2,3,4,5,6,7,8 mm
gives you
outputs of size 1,7,19,33,81,123,179,257 voxels. And you can use
smaller
changes, for instance a 7.3mm kernel gives 203 voxels and a 7.5mm
kernel
gives 251 voxels. So, by trying different values (and masking
afterwards) you
can probably find a value for the kernel which gets you close.
However, I would think more about why you want the same number of
voxels in
each ROI, and whether there are better ways of controlling for this,
as comparing
things with ROIs of different shape is also probably not what you want.
All the best,
Mark
On 21 Oct 2008, at 12:14, Markus Gschwind wrote:
> Hi Mark!
>
> Thanks a lot for your kind answer! OK, I will be more precise.
>
> I need ROIs (=binarised spheres around the activation peak) which
> have about the same number of voxel (for fibertracking).
>
> The problem is that some peaks are quite close to the brain border
> and thus the sphere (5mm radius) extends beyond the mask and gets
> partially cut, which reduces its number of voxels (3x3x3 image
> reslotion).
>
> I thus would like to dilate those ROIs in direction of inside the
> brain in order to compensate for this.
> Now I found that when I am dilating a sphere of 170 voxels (this is
> what the spm-script produced for that sphere of 5mm) with the
> default kernel of 3, I get a sphere of about 450 voxels and not 200.
> This is due to the small size. If I would be dilating a 1000 voxel
> sphere, the increasing step could be a much smaller percentage.
> Maybe this is a principal problem... and I am thinking the wrong
> direction...
>
> What I would like to achieve is that every ROI has finally about 200
> +/- 10 voxels
>
> Thanks a lot for your help!
> All the best, Markus
>
>
>
>
> 2008/10/21 Mark Jenkinson <
[log in to unmask]>
> Hi,
>
> What do you mean by "a tiny bit"?
> Is one voxel too much?
> For one voxel you can just use the default kernel.
>
> If you have a binary mask (or ROI mask) then it isn't
> really well defined to add less than one voxel onto the edge.
>
> Maybe if you describe what you are trying to achieve
> then we can work out what is the best thing to do.
>
> All the best,
> Mark
>
>
>
>
> On 21 Oct 2008, at 10:25, Markus Gschwind wrote:
>
> Hello again!
>
> It seems that
>
> fslmaths INPUT -kernel sphere 0.5 -dilD OUTPUT
>
> or
> fslmaths INPUT -kernel sphere 1 -dilD OUTPUT
>
> is not possible.
>
> It begins at -kernel sphere 3.
>
> Is that right?
>
> How could I dilate my ROI only a tiny bit?
>
> Any hints would be greatly apreciated!
> Thanks,
> Markus
>
>
>
> 2008/10/17 Matthew Webster <
[log in to unmask]>
> Hello,
> The kernel needs to be set before the desired filtering
> operation ( with the default kernel being a 3x3x3 box ).
>
> e.g. to dilate using a 5mm radius spherical kernel around each zero-
> voxel use the following command:
>
> fslmaths INPUT -kernel sphere 5 -dilD OUTPUT
>
> Unfortunately there is no specific option to dilate such that the
> output image has a specific number of voxels...
>
> Many Regards
>
> Matthew
> Hi Steve!
>
> Thank you for the hint. However it is still not clear to me how to
> use this command.
>
> fslmaths INPUT -dilD OUTPUT >> dilates + 1 voxel all around
>
> fslmaths INPUT -dilD -kernel 5 OUPUT >> no effect
>
> fslmaths INPUT -kernel sphere 5 OUTPUT >> no effect
>
> How would be the correct command to dilate the input so as the
> OUTPUT finally has 500 voxels?
>
> Thank you so much!
>
> All the best,
> Markus
>
>
>
>
> 2008/10/16 Steve Smith <
[log in to unmask]>
> Hi - you can change the dilation kernel with the -kernel option
> (type fslmaths to see the options).
> Cheers.
>
>
>
> On 16 Oct 2008, at 15:00, Markus Gschwind wrote:
>
> Hi experts!
>
> I have to dilate ROIs up to a certain voxelsize.
>
> I think this works with fslmaths -dilD or -dilM
>
> However I would like to know if there is a mean to stop the
> dilation at a given number of voxels.
> Does anybody know?
>
> Thanks a lot!
> Markus
>
>
>
> --
> Dr. med. Markus Gschwind, M.D.
> Laboratory for Neurology and Imaging of Cognition
> Dept of Neurosciences
> University Medical Center (CMU)
> 1 Michel-Servet - 1211 GENEVA - CH
>
> Tel 0041 (0) 22 379 5324
> Fax 0041 (0) 22 379 5402
> email:
[log in to unmask]
>
http://labnic.unige.ch
>
>
> ---------------------------------------------------------------------------
> Stephen M. Smith, Professor of Biomedical Engineering
> Associate Director, Oxford University FMRIB Centre
>
> FMRIB, JR Hospital, Headington, Oxford OX3 9DU, UK
> +44 (0) 1865 222726 (fax 222717)
>
[log in to unmask] http://www.fmrib.ox.ac.uk/~steve
> ---------------------------------------------------------------------------
>
>
>
> --
> Dr. med. Markus Gschwind, M.D.
> Laboratory for Neurology and Imaging of Cognition
> Dept of Neurosciences
> University Medical Center (CMU)
> 1 Michel-Servet - 1211 GENEVA - CH
>
> Tel 0041 (0) 22 379 5324
> Fax 0041 (0) 22 379 5402
> email:
[log in to unmask]
>
http://labnic.unige.ch
>
>
>
>
> --
> Dr. med. Markus Gschwind, M.D.
> Laboratory for Neurology and Imaging of Cognition
> Dept of Neurosciences
> University Medical Center (CMU)
> 1 Michel-Servet - 1211 GENEVA - CH
>
> Tel 0041 (0) 22 379 5324
> Fax 0041 (0) 22 379 5402
> email:
[log in to unmask]
>
http://labnic.unige.ch
>
>
>
> --
> Dr. med. Markus Gschwind, M.D.
> Laboratory for Neurology and Imaging of Cognition
> Dept of Neurosciences
> University Medical Center (CMU)
> 1 Michel-Servet - 1211 GENEVA - CH
>
> Tel 0041 (0) 22 379 5324
> Fax 0041 (0) 22 379 5402
> email:
[log in to unmask]
>
http://labnic.unige.ch