Hi everybody,
I jump on this thread and on the conversation that followed (and that you will find below) to dig a little bit more about this manually edited shape analysis.
I would like to test for correlation between a behavioral variable and shape in the striatum as a whole, meaning that I would like to submit the whole striatal shape to randomise rather than testing separately caudate, putamen and accumbens.
Here the steps that I took:
1) For each subject I created a whole striatum image starting from the fast_firstseg image (left and right caudate, putamen and accumbens)
2) I registered this image to the standard space using flirt and the matrix _to_std_sub.mat
3) I merged and averaged all this images, getting an "average striatum" whose values ranged from 0 to 1.
4) I thresholded this average striatum at 0.5 and binirized it
5) I used this thresholded image to create a bounday image as suggested by Mark (fslmaths av_shape -ero -mul -1 -add av_shape boundary)
6) I used distancemap as suggested in the thread ( distancemap -i subject_striatum -m striatum_boundary -o output).
Although I got an output, this is not (I suspect) something that I want to use. Almost all of the voxels, except for a very small minority, have a value of 1, so that there is almost no variance in the image. Moreover, voxels different from zero are either positive or negative (i.e. a subject has a lot of 1 and the values different from 1 are either all positive or all negative). Having worked a lot with first I have an idea about how the images fed to randomise should look like, and it is not like this.
Am I doing something wrong ?
Am I missing/failing some steps ?
Is this a good way of proceeding ?
For any tips or suggestion, my long lasting gratitude.
Best
F.
>Hi,
>An average of binary values is just a standard average, just of a set of values that are each zero or one.
>The result will be values between 0.0 and 1.0 (e.g. 0.3 if 30% of the values were ones and the rest were zeros).
>You do need to decide on a threshold, but for this purpose a value of 0.5 is pretty standard.
>All the best,
>Mark
On 7 May 2014, at 13:03, Alain Imaging <[log in to unmask]> wrote:
> Hey FSL user !
>
> I bump on the conversation between Jeremy and Mark appended at the end of the mail to ask some more question on "manually edited" shape analysis.
>
> While I follow the whole rationale behind the step suggested by Jeremy, there is a technical detail that I miss.
> Jeremy wrote "I need to create a study specific average by putting all the hippo masks into common space and averaging them with fslmaths."
> But, since the structures mask are binary, how do you define an average ? You will end up with an image with value from 0 to (maybe) 1, but you will need than to threshold to obtain a mask that can be fed ti distancemap, am I right ?
> On which bases should I chose this threshold ? Am I totally missing the point and is there another way of creating the average shape ?
>
> Than in advance
>
> Best
>
> Alain
>
> >Hi Jeremy,
>
> >Your understanding is correct.
> >You can make a boundary mask by doing the following:
> > fslmaths av_shape -ero -mul -1 -add av_shape boundary
> >and then you can use this as the -m input to distancemap.
>
> >With the process you shouldn't need to iterate - once through will be enough.
>
> >As for the vtk file - I'm afraid there's no easy way to get that through FSL.
> >However, you could try to make once with MATLAB if you are familiar with the VTK format.
>
> >All the best,
> > Mark
>
>
>
>
> > Dear Mark,
> > Thanks for replying and I have a couple quick follow up question to verify I understand the process correctly.
> >
> > I need to create a study specific average by putting all the hippo masks into common space and averaging them with fslmaths.
> >
> > I can then use distancemap to create the signed distance maps
> >
> > distancemap -i (subject_hippo) -m (average shape) -o output
> >
> > I am guessing I should only perform this on the boundary voxels.
> >
> > After a couple iterations of this it will allow me to create a 4d file I can use as my input for randomise correct?
> >
> > Also, as purely an aesthetic thought this will give me data that I can use to perform statistics on but the .vtk files are generated in the original pipeline and not with this method. Is there another command that can generate the vectors or is that wishful thinking.
> >
> > Thanks,
> > Jeremy
|