User Tools

Site Tools


jvs:fscan:manual:chapter2:clusters

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
jvs:fscan:manual:chapter2:clusters [2015/06/06 19:29] – created voyvodicjvs:fscan:manual:chapter2:clusters [2020/07/15 15:31] voyvodic
Line 3: Line 3:
 ====usage:==== ====usage:====
   * -roi CLUSTER refimage flag name   * -roi CLUSTER refimage flag name
-  * -roi MERGE refimage flag name minvalley minsize mindist +  * -roi MERGE refimage flag name minval minsize mindist
-  * -roi STATS refimage flag showflag mode name value nlevels level0 dlevel +
  
 ====Creating cluster ROIs==== ====Creating cluster ROIs====
Line 17: Line 16:
  
  -roi CLUSTER refimage flag name  -roi CLUSTER refimage flag name
-  Assumes roi mask image as input. +   
- Create an ROI list (name=NAME) of clusters where each +This assumes roi mask image as input. 
-   cluster is defined by its mask value. For each cluster, +It creates an ROI list (name=NAME) of clusters where each cluster is defined by its mask value. For each cluster, 
-   store center-of-mass and radius along principal axes+store center-of-mass and radius along principal axes.
- If REFIMAGE, find peak intensity value and voxel location. +
- By default, ROI list is attached to input mask images.  +
- FLAG: (no values yet) +
-  +
- NAME: name of ROI list. If omitted, list is linked to  +
-          input mask images.+
  
--roi MERGE refimage flag name minvalley minsize mindist+REFIMAGE: If specified, find peak intensity values and voxel locations in REFIMAGE.\\ 
 +If FLAG & 1, REFIMAGE is another ROI mask data set,\\ 
 +If FLAG & 2, REFIMAGE is another dataset with Cluster list; otherwise REFIMAGE is used to find peak intensity values and voxel location.
  
-The MERGE command assumes that the current image is an ROI mask.+By default, ROI list is attached to input mask images
  
-MERGE edits the ROI list. Merge adjacent clusters if: +FLAG (values 1-7 specify MODE, values above 7 are flags that can be added to MODE):  
-  1) distance bet peaks < MINDIST  + 
-  2) stat value in valley between peaks is within MINVALLEY percent of lower peak + * 1 - create a new cluster list; 1 cluster for each group of contiguous voxels\\ 
-  3smaller cluster contains fewer than MINSIZE voxels+ * 2 - compare 2 cluster lists\\ 
 + * 8 - assign cluster ROIs new VALUEs based on REFIMAGE ROIs. For each cluster ROI with peak/center inside a REF ROI, the new cluster ROI value is:\\ 
 +  REF_ROI_value * 10 + Clus_within_REF_num 
 +For multiple cluster ROIs within the same REF ROI, the Clus_within_REF_num is assigned a value 0-9. 
 +If(FLAG&48)==0 these are in first-come order;\\ 
 + * 16 - sort Cluster values  LPI -> RAS\\ 
 + * 32 - sort Cluster values by cluster size (biggest -> smallest) 
 +    
 +NAME: name of ROI list. If omitted, list is linked to input mask images. 
 + 
 +==== Merging Cluster ROIs ==== 
 +-roi MERGE mode refimage flag name arg1 arg2 opflag 
 + 
 +The ROI MERGE command assumes input data set is roi mask image with an ROI cluste list 
 +(usually made with ROI CLUSTER command). The ROI MERGE command 
 +allows you to modify the input data set and/or its Cluster list. 
 + 
 +Merge can be used in different ways depending on the MODE.\\ 
 +  MODE is specifed by name as:  
 + 
 +  (none) - don't modify clusters themselves, just do FLAG>=8 options 
 +  peaks  - Merge adjacent clusters if: 
 +      1) distance (in mm) bet peaks < ARG2 (default 40mm) 
 +      2) REFIMAGE value in valley between peaks is within ARG1 percent  
 +         (default 60%) of lower peak (iff REFIMAGE specified) 
 +  lists 2 - Compare input cluster list to REFIMAGE cluster list. 
 +    ARG1 is flag: 
 +      0 - default 
 +      1 - compare based on cluster center locs, otherwise compare peak locs  
 +      2 - assume cluster lists already compared (idims[7]s) 
 +      4 - don't change cluster values for matched pairs, otherwise change  
 +          cluster values so matched clusters have same values; unmatched clusters have unique values. 
 +      8 - remove unmatched clusters from list    
 +   Matches closest clusters if distance < ARG2 (mindist) 
 +          Sets clusters ival[7] to index of the matched cluster. 
 +          Sets vals[8] to distance between cluster peaks (or ctrs) 
 +  map   3 - Compare input cluster list to mask ROIs in REFIMAGE. 
 +    If ARG1 > 0, new cluster voxel value is: 
 +      REFVALUE * ARG1 + I 
 +        where I starts at 1 and increments to ensure each cluster has unique index. 
 +    If ARG2==0, compare based on cluster center locations,  
 +      otherwise compare peak locations. 
 +  small 4 - Delete clusters smaller than ARG1 size 
 +  big   5 - Keep only ARG1 biggest clusters (delete the rest) 
 +  pairs 6 - filter pairs based on size or distance 
 +    If ARG1==0, filter based on distance (in mm) between pair peaks 
 +    If ARG1==1, filter based on distance (in mm) between pair COMs 
 +    For ARG1 0/1, vals[8] for kept clusters are reset to this distance 
 +    If ARG1==2, filter based on size (in voxels) of smaller in pair 
 +    If ARG1==3, filter based on size (in voxels) of larger in pair 
 +    If ARG1==4, filter based on size (in voxels) summed for pair 
 +    ARG2 is minimum size/distance to keep.  Pairs that are less than the 
 +      minumum value are unpaired (cluster remain in lists) 
 +    (To remove unpaired clusters use "merge lists 0 10" in each list).
      
-  FLAGdo not modify input mask image values when editting ROI list +  REFIMAGE is the reference data set; the type of data depends on the MODE: 
-   (i.e. if merging ROI clusterschange merged mask values)+    peaks - REFIMAGE is a voxel intensity map (e.g. tval map) 
 +    lists REFIMAGE is another mask image with attached cluster list. 
 +    map  - REFIMAGE contains ROI images, typically an Atlas ROI map. 
 +    pairs - REFIMAGE is another mask image with attached cluster list. 
 +    REFIMAGE is omitted if mode is SMALLBIG, or none.
      
 +  As noted above, the meaning of the ARG1, ARG2 options depends on the MODE.
 +   
 +  Other FLAG values:
 +     8 - do not modify input mask image values when editting ROI list; 
 +         by default when ROI clusters are merged or cluster VALUEs are changed, 
 +         the corresponding image voxel values are also changed to match the new cluster VALUEs.
 +    32 - sort cluster list by cluster size (largest to smallest)
 +    64 - sort cluster list by cluster value (smallest to largest)
 +    96 - sort cluster list by peak magnitude
 +   128 - sort cluster list by peak location (LPI -> RAS)
 +
   NAME: name of ROI list. If omitted, list is linked to input mask images.   NAME: name of ROI list. If omitted, list is linked to input mask images.
-  MINVALLEY: (default= 60% of lower peak maximum) +  MINVAL: (default= 60% of lower peak maximum)\\ 
-  MINSIZE: (default= 5 voxels) +  MINSIZE: (default= 5 voxels)\\ 
-  MINDIST: (default= 40 mm)+  MINDIST: (default= 40 mm)\\
      
         
 **See Also:**\\ **See Also:**\\
 +[[jvs:fscan:manual:chapter2:roi|ROIs]],
 +[[jvs:fscan:manual:chapter2:addroi|Create ROIs]],
 +[[jvs:fscan:manual:chapter2:addroi|Create ROIs]],
 +[[jvs:fscan:manual:chapter2:editroi|Edit ROIs]],
 +[[jvs:fscan:manual:chapter2:roistats|ROI Stats]]
 +
 [[jvs:fscan|fScan Home]],  [[jvs:fscan|fScan Home]], 
 [[jvs:fscan:manual|fScan Manual]],  [[jvs:fscan:manual|fScan Manual]], 
 [[jvs:fscan:manual:chapter2|CmdLineOptions]],  [[jvs:fscan:manual:chapter2|CmdLineOptions]], 
 [[jvs:fscan:manual:help|Manual Help]] [[jvs:fscan:manual:help|Manual Help]]
jvs/fscan/manual/chapter2/clusters.txt · Last modified: 2024/06/21 15:44 by 127.0.0.1