[thresh] = 210 FS vol001 AR SCA vol001 vol002 ; (output) 0 255 FS vol002 ; (input) EC CL vol002 ; (input) 1-130 ; Slices [thresh] ; Threshold vol_eccl ; Cluster file (output) EC STAT vol_eccl ; Cluster file (input) doc_eccl ; Cluster statistics file (output) EC CLOSE ; Merge close clusters doc_eccl ; Cluster statistics file 10,2 ; Cluster distance threshold & starting cluster vol_eccl ; Cluster file (input) vol_eccl_close ; Merged cluster file (output) EC FILTER ; doc_eccl ; Cluster statistics file vol_eccl ; Cluster file (input) vol_eccl_filt ; Cluster file (output) 10 1000000 ; Retained sizes EC STAT vol_eccl_filt ; Cluster file (input) doc_eccl_filt ; Cluster statistics file (output) TH M ; Create mask based on threshold vol_eccl_filt ; Cluster file (input) vol_eccl_filt_th ; Mask file (output) b ; Mask is filled with 1's wherever the pixel values exceed the threshold, and with 0's elsewhere. 1.9 ; Threshold CP ; Copy vol002 ; Source file (input) vol_eccl_masked ; Masked file (output) Fs vol_eccl_masked ; Masked file (output) MM ; Mask multiplication vol_eccl_filt_th ; Mask file (input) vol_eccl_masked ; Masked file (output) 0 ; Background FS vol_eccl_masked ; Masked file (output) EC SELECT ; Save clusters at selected locations