Hi,

 

From your question, it sounds like you want the “brightest” 1% of voxels from your white matter mask (1000 voxels from a 100K voxel mask).

 

You can generate a new image with just those surviving voxels using fslmaths:

 

fslmaths your_image.nii.gz -thrP 99 output_image.nii.gz

 

if you want a binary mask output, you could do:

 

fslmaths your_image.nii.gz -thrP 99 -bin output_image_binary.nii.gz

 

 

 

 

Cheers,

 

Taylor Hanayik PhD

Analysis Research Software Engineer

FMRIB, John Radcliffe Hospital

University of Oxford

[log in to unmask]

 

From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of James B <[log in to unmask]>
Date: Monday, 8 August 2022 at 1:59 am
To: [log in to unmask] <[log in to unmask]>
Subject: [FSL] Fslmas mask threshold

Dear FSL community,
I would appreciate your help on this matter.

I have a mask (not binary) for the white matter compsed of 100k voxels. I would like to threshold this mask using "fslmaths" to create a smaller mask of 1000 voxels that have the highest white matter intensity.
 
In more details, the original white matter mask is composed of 100000 voxels. Each voxel has white matter intensity. If I extract a list of white matter intensity for all those 100000 voxels and sort that list (highest inensity first to lowest intsensity), I would like to calculate the average of intensity from the first 1000 voxels. I tried the flags thr and uthr but no luck I appreciate your guidnace,

JB
 

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1

This message was issued to members of www.jiscmail.ac.uk/FSL, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/



To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1