Yes, I'm multiplying the image intensities by a scaling factor. Sorry if
that wasn't clear.

-Brent
On Aug 4, 2015 12:09, "Bruce Fischl" <fis...@nmr.mgh.harvard.edu> wrote:

> Hi Brent
>
> a quick look and it seems that your answer is "yes"? You are multiplying
> the image intensities by some scale factor?
> Bruce
>
>
> On Tue, 4 Aug 2015, Brent Womble wrote:
>
> Yes. Here is the MATLAB script:
>>
>>       for i = [1:20]
>>
>>       %Load the original image and gray matter mask
>>
>>       raw=load_nii([pwd,'/', num2str(i), '/pre.nii'])
>>
>>       a=single(squeeze(raw.img));
>>
>>
>>       c1_raw=load_nii([pwd,'/', num2str(i), '/c1pre.nii']);
>>
>>       c1=squeeze(c1_raw.img);
>>
>>       %Mask is gray around edges. Threshold to make it binary
>>
>>       c1(c1>0.1)=1;
>>
>>       %Convert mask to logical
>>
>>       c1=logical(c1);
>>
>>
>>       %%Generate a 3D gaussian kernel
>>
>>       %Specify the origin, size, and intensity of the kernel
>>
>>       k_origin=origins(i,:); %origins is an i by 3 vector to store
>>       all coordinates
>>
>>       k_size=20;
>>
>>       k_intensity=100;
>>
>>
>>       k=1-fspecial3('gaussian',k_size).*k_intensity;
>>
>>       k(k<0)=0;
>>
>>
>>       %Expand the kernel to the size of the original image
>>
>>       padsize_pre=k_origin - (k_size/2);
>>
>>       padsize_post=size(a) - k_origin - (k_size/2);
>>
>>
>>       k=padarray(k,padsize_post,1,'post');
>>
>>       k=padarray(k,padsize_pre,1,'pre');
>>
>>
>>       %Restrict the kernel to the gray mask
>>
>>       b=k.*c1;
>>
>>       b(~c1)=1;
>>
>>
>>       %%Apply the kernel to the original image
>>
>>       c=b.*a;
>>
>>
>>       %Write to .nii
>>
>>       raw.img=c;
>>
>>       save_nii(raw,[pwd,'/', num2str(i), '/dense-synth.nii']);
>>
>> end
>>
>> On Tue, Aug 4, 2015 at 11:52 AM, Bruce Fischl <fis...@nmr.mgh.harvard.edu
>> >
>> wrote:
>>       Hi Brent
>>
>>       are you saying you just multiplied the gray matter intensities
>>       by some scale factor (>1)?
>>       Bruce
>>
>>       On Tue, 4 Aug 2015, Brent Womble wrote:
>>
>>             Hi everyone,
>>             I've been making synthetic brains to test how
>>             Freesurfer handles various
>>             structural changes.
>>
>>             One of the changes I'm testing is increased density
>>             (like in VBM). To
>>             simulate increased density, I used a spherical
>>             Gaussian multiplication
>>             kernel, with a radius of 20 voxels. I centered this
>>             kernel at a point in
>>             the right superior frontal gyrus and masked the
>>             changes to grey matter using
>>             the segmentation output from SPM12.
>>
>>             Here is an example, a difference image (synth.nii -
>>             pre.nii):
>>             [IMAGE]
>>
>>             ​Around that area, Freesurfer didn't detect a change
>>             (as I expected):
>>             Inline image 2
>>
>>             Original in red and blue, synthetic in pink and
>>             light blue.
>>
>>             The problem is that the longitudinal streams in
>>             Freesurfer found a bunch of
>>             changes in random parts of the brain.
>>
>>             We looked at the recons for each subject
>>             individually, and saw some noise
>>             around the clusters that were significant in the
>>             two-stage model. This
>>             doesn't make sense, because the actual voxels were
>>             exactly the same in that
>>             region. For example:
>>
>>             [IMAGE]
>>
>>             I redid the recon-all with the -nonormalization
>>             flag. It didn't fix the
>>             problem. For example (same subject as above):
>>
>>             [IMAGE]
>>
>>             ​I thought it might have been an issue caused by my
>>             increased density method,
>>             so I ran it again, this time with the kernel
>>             centered in the cerebellum
>>             (still masked to grey matter). I still got weird
>>             changes in unrelated parts
>>             of the cortex. For example (same subject as above):
>>
>>             [IMAGE]
>>             Note: light blue/red and blue/red are reversed in
>>             this one, just because of
>>             the order I loaded it in Freeview.​
>>
>>             In summary, Freesurfer found a bunch of weird
>>             changes that were nowhere near
>>             the changes I actually made.
>>
>>             Where should I go from here?
>>
>>             -Brent
>>
>>
>>
>>       _______________________________________________
>>       Freesurfer mailing list
>>       Freesurfer@nmr.mgh.harvard.edu
>>       https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>>
>>
>>       The information in this e-mail is intended only for the person
>>       to whom it is
>>       addressed. If you believe this e-mail was sent to you in error
>>       and the e-mail
>>       contains patient information, please contact the Partners
>>       Compliance HelpLine at
>>       http://www.partners.org/complianceline . If the e-mail was sent
>>       to you in error
>>       but does not contain patient information, please contact the
>>       sender and properly
>>       dispose of the e-mail.
>>
>>
>>
>>
> _______________________________________________
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to