Anand Joshi

Forum Replies Created

Viewing 7 posts - 166 through 172 (of 172 total)
  • Author
    Posts
  • in reply to: installation problems #162
    Anand Joshi
    Moderator

    Hi Luca,
    Were you able to open the MRI volume in the BrainSuite? What kind of data format are you using?
    Also there is a test data available on the BrainSuite website. Can you try and see if you can open that data?
    Here is a link to the test data.
    http://brainsuite.org/WebTutorialData/BrainSuiteTutorialCSE_Feb15.zip

    Anand

    in reply to: Transform the individual label file to standard space #118
    Anand Joshi
    Moderator

    I am not sure what can be done by putting lesions into common space? If you want to perform measurements of lesions, such as size etc, then you can do that in the original space itself.

    If you really have to transform the lesion labels to a common space, then you can do that using the inverse map stored in SVReg directory (subbasename.svreg.inv.map.nii.gz).

    You can use matlab with the utility functions available from

    http://neuroimage.usc.edu/neuro/Resources/BST_SVReg_Utilities
    assuming your subbasename is name of the subject prefix, including path.

    e.g. if your subject file is c:\Users\ajoshi\Downloads\sub01\sub01.nii.gz then subbasename would be c:\Users\ajoshi\Downloads\sub01\sub01

    and

    atlasbasename=C:\Program Files\BrainSuite15b\svreg\BrainSuiteAtlas1\mri

    The following matlab code should do the warping.
    vmap=load_nii_z(‘subbasename.svreg.inv.map.nii.gz’);
    vw=load_nii_z(‘atlasbasename.label.nii.gz’);
    vlab=load_nii_z(‘subbasename.label.nii.gz’)

    vw.img=interp3(vlab.img,vmap.img(:,:,:,2),vmap.img(:,:,:,1),vmap.img(:,:,:,3),’nearest’);

    save_nii(vlab,’warped_labels.nii.gz’);

    in reply to: Transform the individual label file to standard space #115
    Anand Joshi
    Moderator

    Hi, Can you please explain more what you are trying to do? Are you trying to transform the individual anatomy to common atlas space? SVReg performs registration of subject and atlas and warps atlas to match the subject. The labels from warped atlas are then transferred to the subject anatomy. Can you please explain more about what you are trying to do?

    • This reply was modified 8 years, 5 months ago by Anand Joshi.
    in reply to: Importing ROIs #96
    Anand Joshi
    Moderator

    Hi Wes,
    1 is a fine value for the script. The problem is that the volume is labeled, but these labels are not transferred to the surfaces, so the thickness values are not computed.

    You can follow these steps

    1. run Brainsuite + SVReg
    2. run thicknessPVC.sh
    3. run the following commands
    subbasename=’/Storage/session_1/anat_1/mprage’;
    vol_label_file=’/Storage/1_LH_V1.label.nii’;
    slt=readdfs([subbasename, ‘.pvc-thickness_0-6mm.left.mid.cortex.dfs’]);
    sl=readdfs([subbasename, ‘.left.mid.cortex.svreg.dfs’]);

    sl.attributes=slt.attributes;

    vl=load_untouch_nii(vol_label_file);
    res=vl.hdr.dim.pixdim(2:4);
    % copy volumetric labels to surfaces;
    sl.labels=interp3(double(vl.img),sl.vertices(:,2)/res(2)+1,sl.vertices(:,1)/res(1)+1,sl.vertices(:,3)/res(3)+1,’nearest’);

    slin=readdfs([subbasename, ‘.left.inner.cortex.svreg.dfs’]);
    slpial=readdfs([subbasename, ‘.left.pial.cortex.svreg.dfs’]);

    slin.labels=sl.labels;
    slin.attributes=sl.attributes;

    slpial.labels=sl.labels;
    slpial.attributes=sl.attributes;

    writedfs([subbasename, ‘.left.inner.cortex.svreg2.dfs’],slin);
    writedfs([subbasename, ‘.left.mid.cortex.svreg2.dfs’],sl);
    writedfs([subbasename, ‘.left.pial.cortex.svreg2.dfs’],slpial);

    %% Do the same for the right hemisphere
    slt=readdfs([subbasename, ‘.pvc-thickness_0-6mm.right.mid.cortex.dfs’]);
    sl=readdfs([subbasename, ‘.right.mid.cortex.svreg.dfs’]);

    sl.attributes=slt.attributes;

    vl=load_untouch_nii(vol_label_file);
    res=vl.hdr.dim.pixdim(2:4);
    % copy volumetric labels to surfaces;
    sl.labels=interp3(double(vl.img),sl.vertices(:,2)/res(2)+1,sl.vertices(:,1)/res(1)+1,sl.vertices(:,3)/res(3)+1,’nearest’);

    slin=readdfs([subbasename, ‘.right.inner.cortex.svreg.dfs’]);
    slpial=readdfs([subbasename, ‘.right.pial.cortex.svreg.dfs’]);

    slin.labels=sl.labels;
    slin.attributes=sl.attributes;

    slpial.labels=sl.labels;
    slpial.attributes=sl.attributes;

    writedfs([subbasename, ‘.right.inner.cortex.svreg2.dfs’],slin);
    writedfs([subbasename, ‘.right.mid.cortex.svreg2.dfs’],sl);
    writedfs([subbasename, ‘.right.pial.cortex.svreg2.dfs’],slpial);

    4. now run

    ROI_IDs= [1];
    surf_ext=’svreg2.dfs’;
    output_ext=’testout’; %[subbasename,’.roiwise.’,output_ext,’.stats.txt’]
    generate_stats_xls_manual(subbasename,vol_label_file,ROI_IDs,surf_ext,output_ext);

    This should work. Please let me know if there is any problem.

    • This reply was modified 8 years, 6 months ago by Anand Joshi.
    in reply to: Importing ROIs #93
    Anand Joshi
    Moderator

    Great! Good that things are working. Please let me know if there are any more issues.

    in reply to: Importing ROIs #87
    Anand Joshi
    Moderator

    Hi Wes,
    I can help you with this.
    There is matlab script to use a different list of ROIs to compute the statistical measures. (item 6). You can specify the list of ROIs, names of surface and volume label files to this script and the script will output all the cortical and volumetric measures.

    http://neuroimage.usc.edu/neuro/Resources/BST_SVReg_Utilities
    \
    Also you can create their own atlas with you own ROIs (item 7) and then compute statistics on those.

    Please give it a try and let me know if it works.

    Anand

    in reply to: brain atlas #69
    Anand Joshi
    Moderator

    Hi, I can help you with creation of a new brain atlas.
    Please follow item 7. at http://neuroimage.usc.edu/neuro/Resources/BST_SVReg_Utilities
    If you have any difficulty please let us know.
    Anand

Viewing 7 posts - 166 through 172 (of 172 total)