Re: [HCP-Users] two maximum points using -metric-extrema

2018-08-26 Thread Xinyang Liu
Ok, I will do that. Thanks. :)


Best,
Xinyang


At 2018-08-27 11:16:42, "Glasser, Matthew"  wrote:

Would have to ask that on the FSL list.


Matt.


From: Xinyang Liu 
Date: Sunday, August 26, 2018 at 10:14 PM
To: Matt Glasser 
Cc: Timothy Coalson , HCP 讨论组 
Subject: Re: [HCP-Users] two maximum points using -metric-extrema



Hi, Matt.
I saw the second ROI on WB as you said then. Thank you so much!


Then another left question is, when I use $FSL/surf2surf to change the 
.func.gii file (with two ROIs included) to .asc format, I only saw the  
coordinates information of one ROI (vertices with 1 values). The .func.gii 
showed vertex number of two ROIs, i.e. 127, 48. But when checking the 
transformed .asc file, I only found the ROI coordinates of the first ROI (127 
vertices), not the second. 


Does it mean the two produced ROIs are saved separately in .func.gii, but the 
"surf2surf "command can only transform one of them to .asc?



Best regards,
Xinyang



At 2018-08-27 01:12:54, "Glasser, Matthew"  wrote:

The other should be in the next map of the ROI file.


Matt.


From: Xinyang Liu 
Date: Sunday, August 26, 2018 at 2:41 AM
To: Matt Glasser 
Cc: Timothy Coalson , HCP 讨论组 
Subject: Re: [HCP-Users] two maximum points using -metric-extrema



Hi, Matt.
Sure. I attached two pictures and two produced GIFTI files here. 


In data processing, I first used -metric-extrema to find the maximum point 
within a certain fMRI region. The "maximum_IPS.JPG" attached was among the 
condition that two maximum points were found (please see the two yellow points 
in the first attached picture). The corresponding GIFTI file is 
"L.maxima.func.gii".


Then I continued using the "L.maxima.func.gii" and -metric-rois-from-extrema to 
draw ROIs, the result only showed one created ROI based on one maximum point, 
as the second picture (IPS_ROI.JPG) attached. The "TARGET_ROI_IPS_L.func.gii" 
file is also attached.


I also used the -metric-stats to calculate the vertex number of the created 
ROI, but the result provided two values: 127, 48.


So I am quite confusing about what happened here.


Best regards,
Xinyang





At 2018-08-26 13:03:42, "Glasser, Matthew"  wrote:

How about posting some screen captures so we know what is happening?


Matt.


From: Xinyang Liu 
Date: Saturday, August 25, 2018 at 11:51 PM
To: Timothy Coalson 
Cc: Matt Glasser , HCP 讨论组 
Subject: Re: [HCP-Users] two maximum points using -metric-extrema



Dear Tim, dear Matt,


Thank you very much for your helpful answers.


Sorry that I may not described very clearly before. As Tim mentioned, we used 
the -metric-extrema to find the maximum point within a certain region (produce 
"maxima.func.gii" file) and then use the -metric-rois-from-extrema to draw ROIs 
(produced "ROI.func.gii" file). 


Then there is a contradictory thing emerged. When we used "wb_command 
-metric-stats ROI.func.gii -reduce -SUM "to count the ROI vertex number, a few 
results showed  two values, which might indicate two ROIs based on the two 
maximum points. We checked the maxima.func.gii files, and found there do 
existed two maximum points in such condition. However, when we looked at the 
created ROI images on Connectome Workbench, we only saw one target ROI drawn on 
the brain surface. This confused us a lot. We don't know whether there were one 
or two ROIs produced. Do you have any suggestions about that? Thanks.


Best regards,
Xinyang





At 2018-08-25 04:16:48, "Timothy Coalson"  wrote:

The -metric-extrema command doesn't draw ROIs, it sets single vertices to 1 or 
-1 based on if they are a local maximum or minimum.  By default, if there are 
two equal values that are closer than the search range, then *neither* of them 
will be identified as an extrema.  If they are further then the search range, 
then both may be extrema.


The -consolidate-mode acts somewhat differently - if two equal values are 
touching, neither is treated as an initial extrema, but as long as there is at 
least one vertex separating them, they may both be treated as initial extrema.  
After the initial extrema are found, all extrema that are close to other 
extrema are "consolidated" together.  The details are somewhat complicated, and 
it was implemented by request of others, it is not something that we use.


Tim




On Fri, Aug 24, 2018 at 7:11 AM, Xinyang Liu  wrote:

Hi, Matt. Thank you very much for your reply.


The extreme point was searched in a certain surface area. Do you mean that even 
there are two maximum points with the same value, they were controlled in a 
limited distance and therefore, the final drawn ROI is a combined region of two 
drawings instead of two separate ones? 


Because the problem is that, when I count the total vertex number for each 
created ROI using -metric-stats, a few results showed two values for one ROI.  
I am wondering why this happen and how to deal with that.


Best regards,
Xinyang



At 2018-08-24 19:14:56, "Glasser, Matthew"  wrote:

I believe there 

Re: [HCP-Users] two maximum points using -metric-extrema

2018-08-26 Thread Glasser, Matthew
Would have to ask that on the FSL list.

Matt.

From: Xinyang Liu mailto:xinyang_ie...@163.com>>
Date: Sunday, August 26, 2018 at 10:14 PM
To: Matt Glasser mailto:glass...@wustl.edu>>
Cc: Timothy Coalson mailto:tsc...@mst.edu>>, HCP 讨论组 
mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] two maximum points using -metric-extrema

Hi, Matt.
I saw the second ROI on WB as you said then. Thank you so much!

Then another left question is, when I use $FSL/surf2surf to change the 
.func.gii file (with two ROIs included) to .asc format, I only saw the  
coordinates information of one ROI (vertices with 1 values). The .func.gii 
showed vertex number of two ROIs, i.e. 127, 48. But when checking the 
transformed .asc file, I only found the ROI coordinates of the first ROI (127 
vertices), not the second.

Does it mean the two produced ROIs are saved separately in .func.gii, but the 
"surf2surf "command can only transform one of them to .asc?

Best regards,
Xinyang


At 2018-08-27 01:12:54, "Glasser, Matthew" 
mailto:glass...@wustl.edu>> wrote:
The other should be in the next map of the ROI file.

Matt.

From: Xinyang Liu mailto:xinyang_ie...@163.com>>
Date: Sunday, August 26, 2018 at 2:41 AM
To: Matt Glasser mailto:glass...@wustl.edu>>
Cc: Timothy Coalson mailto:tsc...@mst.edu>>, HCP 讨论组 
mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] two maximum points using -metric-extrema

Hi, Matt.
Sure. I attached two pictures and two produced GIFTI files here.

In data processing, I first used -metric-extrema to find the maximum point 
within a certain fMRI region. The "maximum_IPS.JPG" attached was among the 
condition that two maximum points were found (please see the two yellow points 
in the first attached picture). The corresponding GIFTI file is 
"L.maxima.func.gii".

Then I continued using the "L.maxima.func.gii" and -metric-rois-from-extrema to 
draw ROIs, the result only showed one created ROI based on one maximum point, 
as the second picture (IPS_ROI.JPG) attached. The "TARGET_ROI_IPS_L.func.gii" 
file is also attached.

I also used the -metric-stats to calculate the vertex number of the created 
ROI, but the result provided two values: 127, 48.

So I am quite confusing about what happened here.

Best regards,
Xinyang



At 2018-08-26 13:03:42, "Glasser, Matthew" 
mailto:glass...@wustl.edu>> wrote:
How about posting some screen captures so we know what is happening?

Matt.

From: Xinyang Liu mailto:xinyang_ie...@163.com>>
Date: Saturday, August 25, 2018 at 11:51 PM
To: Timothy Coalson mailto:tsc...@mst.edu>>
Cc: Matt Glasser mailto:glass...@wustl.edu>>, HCP 讨论组 
mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] two maximum points using -metric-extrema

Dear Tim, dear Matt,

Thank you very much for your helpful answers.

Sorry that I may not described very clearly before. As Tim mentioned, we used 
the -metric-extrema to find the maximum point within a certain region (produce 
"maxima.func.gii" file) and then use the -metric-rois-from-extrema to draw ROIs 
(produced "ROI.func.gii" file).

Then there is a contradictory thing emerged. When we used "wb_command 
-metric-stats ROI.func.gii -reduce -SUM "to count the ROI vertex number, a few 
results showed  two values, which might indicate two ROIs based on the two 
maximum points. We checked the maxima.func.gii files, and found there do 
existed two maximum points in such condition. However, when we looked at the 
created ROI images on Connectome Workbench, we only saw one target ROI drawn on 
the brain surface. This confused us a lot. We don't know whether there were one 
or two ROIs produced. Do you have any suggestions about that? Thanks.

Best regards,
Xinyang



At 2018-08-25 04:16:48, "Timothy Coalson" 
mailto:tsc...@mst.edu>> wrote:
The -metric-extrema command doesn't draw ROIs, it sets single vertices to 1 or 
-1 based on if they are a local maximum or minimum.  By default, if there are 
two equal values that are closer than the search range, then *neither* of them 
will be identified as an extrema.  If they are further then the search range, 
then both may be extrema.

The -consolidate-mode acts somewhat differently - if two equal values are 
touching, neither is treated as an initial extrema, but as long as there is at 
least one vertex separating them, they may both be treated as initial extrema.  
After the initial extrema are found, all extrema that are close to other 
extrema are "consolidated" together.  The details are somewhat complicated, and 
it was implemented by request of others, it is not something that we use.

Tim


On Fri, Aug 24, 2018 at 7:11 AM, Xinyang Liu 
mailto:xinyang_ie...@163.com>> wrote:
Hi, Matt. Thank you very much for your reply.

The extreme point was searched in a certain surface area. Do you mean that even 
there are two maximum points with the same value, they were controlled in a 
limited distance and therefore, the final drawn ROI is a combined region of two 
drawings instead of two 

Re: [HCP-Users] two maximum points using -metric-extrema

2018-08-26 Thread Xinyang Liu
Hi, Matt.
I saw the second ROI on WB as you said then. Thank you so much!


Then another left question is, when I use $FSL/surf2surf to change the 
.func.gii file (with two ROIs included) to .asc format, I only saw the  
coordinates information of one ROI (vertices with 1 values). The .func.gii 
showed vertex number of two ROIs, i.e. 127, 48. But when checking the 
transformed .asc file, I only found the ROI coordinates of the first ROI (127 
vertices), not the second. 


Does it mean the two produced ROIs are saved separately in .func.gii, but the 
"surf2surf "command can only transform one of them to .asc?



Best regards,
Xinyang



At 2018-08-27 01:12:54, "Glasser, Matthew"  wrote:

The other should be in the next map of the ROI file.


Matt.


From: Xinyang Liu 
Date: Sunday, August 26, 2018 at 2:41 AM
To: Matt Glasser 
Cc: Timothy Coalson , HCP 讨论组 
Subject: Re: [HCP-Users] two maximum points using -metric-extrema



Hi, Matt.
Sure. I attached two pictures and two produced GIFTI files here. 


In data processing, I first used -metric-extrema to find the maximum point 
within a certain fMRI region. The "maximum_IPS.JPG" attached was among the 
condition that two maximum points were found (please see the two yellow points 
in the first attached picture). The corresponding GIFTI file is 
"L.maxima.func.gii".


Then I continued using the "L.maxima.func.gii" and -metric-rois-from-extrema to 
draw ROIs, the result only showed one created ROI based on one maximum point, 
as the second picture (IPS_ROI.JPG) attached. The "TARGET_ROI_IPS_L.func.gii" 
file is also attached.


I also used the -metric-stats to calculate the vertex number of the created 
ROI, but the result provided two values: 127, 48.


So I am quite confusing about what happened here.


Best regards,
Xinyang





At 2018-08-26 13:03:42, "Glasser, Matthew"  wrote:

How about posting some screen captures so we know what is happening?


Matt.


From: Xinyang Liu 
Date: Saturday, August 25, 2018 at 11:51 PM
To: Timothy Coalson 
Cc: Matt Glasser , HCP 讨论组 
Subject: Re: [HCP-Users] two maximum points using -metric-extrema



Dear Tim, dear Matt,


Thank you very much for your helpful answers.


Sorry that I may not described very clearly before. As Tim mentioned, we used 
the -metric-extrema to find the maximum point within a certain region (produce 
"maxima.func.gii" file) and then use the -metric-rois-from-extrema to draw ROIs 
(produced "ROI.func.gii" file). 


Then there is a contradictory thing emerged. When we used "wb_command 
-metric-stats ROI.func.gii -reduce -SUM "to count the ROI vertex number, a few 
results showed  two values, which might indicate two ROIs based on the two 
maximum points. We checked the maxima.func.gii files, and found there do 
existed two maximum points in such condition. However, when we looked at the 
created ROI images on Connectome Workbench, we only saw one target ROI drawn on 
the brain surface. This confused us a lot. We don't know whether there were one 
or two ROIs produced. Do you have any suggestions about that? Thanks.


Best regards,
Xinyang





At 2018-08-25 04:16:48, "Timothy Coalson"  wrote:

The -metric-extrema command doesn't draw ROIs, it sets single vertices to 1 or 
-1 based on if they are a local maximum or minimum.  By default, if there are 
two equal values that are closer than the search range, then *neither* of them 
will be identified as an extrema.  If they are further then the search range, 
then both may be extrema.


The -consolidate-mode acts somewhat differently - if two equal values are 
touching, neither is treated as an initial extrema, but as long as there is at 
least one vertex separating them, they may both be treated as initial extrema.  
After the initial extrema are found, all extrema that are close to other 
extrema are "consolidated" together.  The details are somewhat complicated, and 
it was implemented by request of others, it is not something that we use.


Tim




On Fri, Aug 24, 2018 at 7:11 AM, Xinyang Liu  wrote:

Hi, Matt. Thank you very much for your reply.


The extreme point was searched in a certain surface area. Do you mean that even 
there are two maximum points with the same value, they were controlled in a 
limited distance and therefore, the final drawn ROI is a combined region of two 
drawings instead of two separate ones? 


Because the problem is that, when I count the total vertex number for each 
created ROI using -metric-stats, a few results showed two values for one ROI.  
I am wondering why this happen and how to deal with that.


Best regards,
Xinyang



At 2018-08-24 19:14:56, "Glasser, Matthew"  wrote:

I believe there is a configurable setting that sets the minimum distance 
between extrema.  It is a local min/max that is found.


Matt.


From:  on behalf of Xinyang Liu 

Date: Friday, August 24, 2018 at 4:21 AM
To: HCP 讨论组 
Subject: [HCP-Users] two maximum points using -metric-extrema



Dear HCP experts,


Hi. When using workbench command 

Re: [HCP-Users] PostFreeSurfer Pipeline

2018-08-26 Thread Glasser, Matthew
Have a look at the example script:

https://github.com/Washington-University/HCPpipelines/blob/master/Examples/Scripts/PostFreeSurferPipelineBatch.sh

I have just fixed it to default to MSMSulc in the latest master.

As for 0.9mm T1w and T2w data, you could make 0.9mm templates of the various 
files if you wanted (or use the 0.8mm version).

flirt -applyisoxfm 0.9 would do it.  Be sure to use spline interpolation for 
images and nearest neighbor interpolation for masks.

Matt.

From: 
mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of Shachar Gal mailto:gal.shac...@gmail.com>>
Date: Sunday, August 26, 2018 at 2:34 AM
To: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Cc: Niv Tik mailto:niv...@gmail.com>>
Subject: [HCP-Users] PostFreeSurfer Pipeline

Hello,
Before running the PostFreeSurfer pipeline on our data, we had some questions -
1) If our T1 resolution is 0.9 mm, and not 0.7 (like the HCP data), will we 
encounter a problem during the process of registration back to the native space 
using this pipeline?
2) We would appreciate a clarification regarding the variables that are needed 
for this script to run (added bellow). we figure that most of the paths are 
found in the 'global' dir, but not sure exactly which.

SurfaceAtlasDIR
GrayordinatesSpaceDIR
GrayordinatesResolutions
HighResMesh
LowResMeshes
SubcorticalGrayLabel
FreeSurferLabels
ReferenceMyelinMaps
CorrectionSigma
RegName
InflateExtraScale

Thanks,
Shachar Gal, Tel Aviv University

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


[HCP-Users] PostFreeSurfer Pipeline

2018-08-26 Thread Shachar Gal
Hello,
Before running the PostFreeSurfer pipeline on our data, we had some
questions -
1) If our T1 resolution is 0.9 mm, and not 0.7 (like the HCP data), will we
encounter a problem during the process of registration back to the native
space using this pipeline?
2) We would appreciate a clarification regarding the variables that are
needed for this script to run (added bellow). we figure that most of the
paths are found in the 'global' dir, but not sure exactly which.

SurfaceAtlasDIR
GrayordinatesSpaceDIR
GrayordinatesResolutions
HighResMesh
LowResMeshes
SubcorticalGrayLabel
FreeSurferLabels
ReferenceMyelinMaps
CorrectionSigma
RegName
InflateExtraScale

Thanks,
Shachar Gal, Tel Aviv University

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


[HCP-Users] Re:   HCP pipeline for Lifespan Pilot Data

2018-08-26 Thread Glasser, Matthew
You need to set up the script appropriately meaning convert from standard field 
map to topup-based field map readout distortion correction, use appropriately 
sized templates, etc, so change these variables:

T1wInputImages="${StudyFolder}/${Subject}/unprocessed/3T/T1w_MPR1/${Subject}_3T_T1w_MPR1_gdc.nii.gz"
T2wInputImages="${StudyFolder}/${Subject}/unprocessed/3T/T2w_SPC1/${Subject}_3T_T2w_SPC1_gdc.nii.gz"

AvgrdcSTRING=“TOPUP"
MagnitudeInputName=“NONE"
PhaseInputName=“NONE"
TE=“NONE

SpinEchoPhaseEncodeNegative="${StudyFolder}/${Subject}/unprocessed/3T/T1w_MPR1/${Subject}_3T_SpinEchoFieldMap_LR_gdc.nii.gz"
SpinEchoPhaseEncodePositive="${StudyFolder}/${Subject}/unprocessed/3T/T1w_MPR1/${Subject}_3T_SpinEchoFieldMap_RL_gdc.nii.gz"
DwellTime="0.000580002668012"
SEUnwarpDir=“x"
TopupConfig="${HCPPIPEDIR_Config}/b02b0.cnf"

T1wTemplate="${HCPPIPEDIR_Templates}/MNI152_T1_0.8mm.nii.gz"
T1wTemplateBrain="${HCPPIPEDIR_Templates}/MNI152_T1_0.8mm_brain.nii.gz"
T2wTemplate="${HCPPIPEDIR_Templates}/MNI152_T2_0.8mm.nii.gz"
T2wTemplateBrain="${HCPPIPEDIR_Templates}/MNI152_T2_0.8mm_brain.nii.gz"
TemplateMask="${HCPPIPEDIR_Templates}/MNI152_T1_0.8mm_brain_mask.nii.gz”

You will need to make corresponding changes to the fMRIVolume Pipeline as well.

Matt.

From: 南 修司郎 mailto:shujiromin...@me.com>>
Date: Sunday, August 26, 2018 at 6:26 PM
To: Matt Glasser mailto:glass...@wustl.edu>>
Cc: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] HCP pipeline for Lifespan Pilot Data

This is my PreFreeSurferPipelineBatch.sh file. Thank you.

Shujiro

#!/bin/bash

#~ND~FORMAT~MARKDOWN~
#~ND~START~
#
# # PreFreeSurferPipelineBatch.sh
#
# ## Copyright Notice
#
# Copyright (C) 2013-2018 The Human Connectome Project
#
# * Washington University in St. Louis
# * University of Minnesota
# * Oxford University
#
# ## Author(s)
#
# * Matthew F. Glasser, Department of Anatomy and Neurobiology,
# Washington University in St. Louis
# * Timothy B. Brown, Neuroinformatics Research Group,
# Washington University in St. Louis
#
# ## Product
#
# [Human Connectome Project][HCP] (HCP) Pipelines
#
# ## License
#
# See the 
[LICENSE](https://github.com/Washington-University/Pipelines/blob/master/LICENSE.md)
 file
#
# ## Description:
#
# Example script for running the Pre-FreeSurfer phase of the HCP Structural
# Preprocessing pipeline
#
# See [Glasser et al. 2013][GlasserEtAl].
#
# ## Prerequisites
#
# ### Installed software
#
# * FSL (version 5.0.6)
# * FreeSurfer (version 5.3.0-HCP)
# * gradunwarp (HCP version 1.0.2) - if doing gradient distortion correction
#
# ### Environment variables
#
# Should be set in script file pointed to by EnvironmentScript variable.
# See setting of the EnvironmentScript variable in the main() function
# below.
#
# * FSLDIR - main FSL installation directory
# * FREESURFER_HOME - main FreeSurfer installation directory
# * HCPPIPEDIR - main HCP Pipelines installation directory
# * CARET7DIR - main Connectome Workbench installation directory
# * PATH - must point to where gradient_unwarp.py is if doing gradient unwarping
#
# 
# [HCP]: http://www.humanconnectome.org
# [GlasserEtAl]: http://www.ncbi.nlm.nih.gov/pubmed/23668970
#
#~ND~END~

# Function: get_batch_options
# Description
#
# Retrieve the following command line parameter values if specified
#
# --StudyFolder= - primary study folder containing subject ID subdirectories
# --Subjlist= - quoted, space separated list of subject IDs on which
# to run the pipeline
# --runlocal - if specified (without an argument), processing is run
# on "this" machine as opposed to being submitted to a
# computing grid
#
# Set the values of the following global variables to reflect command
# line specified parameters
#
# command_line_specified_study_folder
# command_line_specified_subj_list
# command_line_specified_run_local
#
# These values are intended to be used to override any values set
# directly within this script file
get_batch_options() {
local arguments=("$@")

unset command_line_specified_study_folder
unset command_line_specified_subj
unset command_line_specified_run_local

local index=0
local numArgs=${#arguments[@]}
local argument

while [ ${index} -lt ${numArgs} ]; do
argument=${arguments[index]}

case ${argument} in
--StudyFolder=*)
command_line_specified_study_folder=${argument#*=}
index=$(( index + 1 ))
;;
--Subject=*)
command_line_specified_subj=${argument#*=}
index=$(( index + 1 ))
;;
--runlocal)
command_line_specified_run_local="TRUE"
index=$(( index + 1 ))
;;
*)
echo ""
echo "ERROR: Unrecognized Option: ${argument}"
echo ""
exit 1
;;
esac
done
}

# Function: main
# Description: main processing work of this script
main()
{
get_batch_options "$@"

# Set variable values that locate and specify data to process
StudyFolder="${HOME}/projects/Pipelines_ExampleData" # Location of Subject 
folders (named by subjectID)
Subjlist="LS2001" # Space delimited list of subject IDs

# Set variable value 

Re: [HCP-Users]   HCP pipeline for Lifespan Pilot Data

2018-08-26 Thread 南 修司郎

This is my PreFreeSurferPipelineBatch.sh file. Thank you.

Shujiro

#!/bin/bash

#~ND~FORMAT~MARKDOWN~
#~ND~START~
#
# # PreFreeSurferPipelineBatch.sh
#
# ## Copyright Notice
#
# Copyright (C) 2013-2018 The Human Connectome Project
#
# * Washington University in St. Louis
# * University of Minnesota
# * Oxford University
#
# ## Author(s)
#
# * Matthew F. Glasser, Department of Anatomy and Neurobiology,
# Washington University in St. Louis
# * Timothy B. Brown, Neuroinformatics Research Group,
# Washington University in St. Louis
#
# ## Product
#
# [Human Connectome Project][HCP] (HCP) Pipelines
#
# ## License
#
# See the 
[LICENSE](https://github.com/Washington-University/Pipelines/blob/master/LICENSE.md)
 file
#
# ## Description:
#
# Example script for running the Pre-FreeSurfer phase of the HCP Structural
# Preprocessing pipeline
#
# See [Glasser et al. 2013][GlasserEtAl].
#
# ## Prerequisites
#
# ### Installed software
#
# * FSL (version 5.0.6)
# * FreeSurfer (version 5.3.0-HCP)
# * gradunwarp (HCP version 1.0.2) - if doing gradient distortion correction
#
# ### Environment variables
#
# Should be set in script file pointed to by EnvironmentScript variable.
# See setting of the EnvironmentScript variable in the main() function
# below.
#
# * FSLDIR - main FSL installation directory
# * FREESURFER_HOME - main FreeSurfer installation directory
# * HCPPIPEDIR - main HCP Pipelines installation directory
# * CARET7DIR - main Connectome Workbench installation directory
# * PATH - must point to where gradient_unwarp.py is if doing gradient unwarping
#
# 
# [HCP]: http://www.humanconnectome.org
# [GlasserEtAl]: http://www.ncbi.nlm.nih.gov/pubmed/23668970
#
#~ND~END~

# Function: get_batch_options
# Description
#
# Retrieve the following command line parameter values if specified
#
# --StudyFolder= - primary study folder containing subject ID subdirectories
# --Subjlist= - quoted, space separated list of subject IDs on which
# to run the pipeline
# --runlocal - if specified (without an argument), processing is run
# on "this" machine as opposed to being submitted to a
# computing grid
#
# Set the values of the following global variables to reflect command
# line specified parameters
#
# command_line_specified_study_folder
# command_line_specified_subj_list
# command_line_specified_run_local
#
# These values are intended to be used to override any values set
# directly within this script file
get_batch_options() {
local arguments=("$@")

unset command_line_specified_study_folder
unset command_line_specified_subj
unset command_line_specified_run_local

local index=0
local numArgs=${#arguments[@]}
local argument

while [ ${index} -lt ${numArgs} ]; do
argument=${arguments[index]}

case ${argument} in
--StudyFolder=*)
command_line_specified_study_folder=${argument#*=}
index=$(( index + 1 ))
;;
--Subject=*)
command_line_specified_subj=${argument#*=}
index=$(( index + 1 ))
;;
--runlocal)
command_line_specified_run_local="TRUE"
index=$(( index + 1 ))
;;
*)
echo ""
echo "ERROR: Unrecognized Option: ${argument}"
echo ""
exit 1
;;
esac
done
}

# Function: main
# Description: main processing work of this script
main()
{
get_batch_options "$@"

# Set variable values that locate and specify data to process
StudyFolder="${HOME}/projects/Pipelines_ExampleData" # Location of Subject 
folders (named by subjectID)
Subjlist="LS2001" # Space delimited list of subject IDs

# Set variable value that sets up environment
EnvironmentScript="${HOME}/projects/Pipelines/Examples/Scripts/SetUpHCPPipeline.sh"
 # Pipeline environment script

# Use any command line specified options to override any of the variable 
settings above
if [ -n "${command_line_specified_study_folder}" ]; then
StudyFolder="${command_line_specified_study_folder}"
fi

if [ -n "${command_line_specified_subj}" ]; then
Subjlist="${command_line_specified_subj}"
fi

# Report major script control variables to user
echo "StudyFolder: ${StudyFolder}"
echo "Subjlist: ${Subjlist}"
echo "EnvironmentScript: ${EnvironmentScript}"
echo "Run locally: ${command_line_specified_run_local}"

# Set up pipeline environment variables and software
source ${EnvironmentScript}

# Define processing queue to be used if submitted to job scheduler
# if [ X$SGE_ROOT != X ] ; then
# QUEUE="-q long.q"
# QUEUE="-q veryshort.q"
QUEUE="-q hcp_priority.q"
# fi

# If PRINTCOM is not a null or empty string variable, then
# this script and other scripts that it calls will simply
# print out the primary commands it otherwise would run.
# This printing will be done using the command specified
# in the PRINTCOM variable
PRINTCOM=""
# PRINTCOM="echo"

#
# Inputs:
#
# Scripts called by this script do NOT assume anything about the form of the
# input names or paths. This batch script assumes the HCP raw data naming
# convention, e.g.
#
# 
${StudyFolder}/${Subject}/unprocessed/3T/T1w_MPR1/${Subject}_3T_T1w_MPR1.nii.gz
# 
${StudyFolder}/${Subject}/unprocessed/3T/T1w_MPR2/${Subject}_3T_T1w_MPR2.nii.gz
#
# 

[HCP-Users] Re:   HCP pipeline for Lifespan Pilot Data

2018-08-26 Thread Glasser, Matthew
What is in your ./PreFreeSurferPipelineBatch.sh file?

Matt.

From: 南 修司郎 mailto:shujiromin...@me.com>>
Date: Sunday, August 26, 2018 at 6:14 PM
To: Matt Glasser mailto:glass...@wustl.edu>>
Cc: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] HCP pipeline for Lifespan Pilot Data

I performed PrefreeSerferPipeline, and get the following message.

shujirominami@shujirominami-MacBookAir-Ubuntu:~/projects/Pipelines/Examples/Scripts$
 ./PreFreeSurferPipelineBatch.sh
StudyFolder: /home/shujirominami/projects/Pipelines_ExampleData
Subjlist: LS2001
EnvironmentScript: 
/home/shujirominami/projects/Pipelines/Examples/Scripts/SetUpHCPPipeline.sh
Run locally:
This script must be SOURCED to correctly setup the environment prior to running 
any of the other HCP scripts contained here
LS2001
Found 1 T1w Images for subject LS2001
Found 1 T2w Images for subject LS2001
About to use fsl_sub to queue or run 
/home/shujirominami/projects/Pipelines/PreFreeSurfer/PreFreeSurferPipeline.sh
Cannot open volume 
/home/shujirominami/projects/Pipelines_ExampleData/LS2001/unprocessed/3T/T1w_MPR1/LS2001_3T_FieldMap_Magnitude
 for reading!

Shujiro

2018年8月27日 08:02、"Glasser, Matthew" 
mailto:glass...@wustl.edu>>さんのメッセージ:

What about your pipeline call?

Matt.

From: 南 修司郎 mailto:shujiromin...@me.com>>
Date: Sunday, August 26, 2018 at 6:00 PM
To: Matt Glasser mailto:glass...@wustl.edu>>
Cc: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] HCP pipeline for Lifespan Pilot Data

The T1w_MPR1 file includes the followings. Thank you.

LS2001_3T_SpinEchoFieldMap_LR_gdc.nii.gz
LS2001_3T_SpinEchoFieldMap_RL.nii.gz
LS2001_3T_SpinEchoFieldMap_LR.nii.gz
LS2001_3T_T1w_MPR1_gdc.nii.gz
LS2001_3T_SpinEchoFieldMap_RL_gdc.nii.gz
LS2001_3T_T1w_MPR1.nii.gz

Shujiro

2018年8月27日 07:48、"Glasser, Matthew" 
mailto:glass...@wustl.edu>>さんのメッセージ:

List your pipeline call and the files you have available, as I don’t recall 
what was distributed in the pilot data.

Matt.

From: 
mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of 南 修司郎 mailto:shujiromin...@me.com>>
Date: Sunday, August 26, 2018 at 5:45 PM
To: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: [HCP-Users] HCP pipeline for Lifespan Pilot Data

Dear HCP experts,

I am trying to perform HCP pipeline for the WU-Minn HCP Lifespan Pilot Data. 
The following error occurred, because WU-Minn HCP Lifespan Pilot Data doesn't 
have "FieldMap_Magnitude" file.

"Cannot open volume 
/home/shujirominami/projects/Pipelines_ExampleData/LS2001/unprocessed/3T/T1w_MPR1/LS2001_3T_FieldMap_Magnitude
 for reading!"

I'd like to appreciate if you could explain the solution.

Best regards.

Shujiro Minami M.D., Ph.D.
Dpt. of Otolaryngology National Tokyo Medical Center
2-5-1 Higashigaoka, Meguro, Tokyo 152-8902, Japan
E-mail shujiromin...@me.com

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users




The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.




The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.


The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users]   HCP pipeline for Lifespan Pilot Data

2018-08-26 Thread 南 修司郎

I performed PrefreeSerferPipeline, and get the following message.

shujirominami@shujirominami-MacBookAir-Ubuntu:~/projects/Pipelines/Examples/Scripts$ ./PreFreeSurferPipelineBatch.sh 
StudyFolder: /home/shujirominami/projects/Pipelines_ExampleData

Subjlist: LS2001
EnvironmentScript: 
/home/shujirominami/projects/Pipelines/Examples/Scripts/SetUpHCPPipeline.sh
Run locally: 
This script must be SOURCED to correctly setup the environment prior to running any of the other HCP scripts contained here

LS2001
Found 1 T1w Images for subject LS2001
Found 1 T2w Images for subject LS2001
About to use fsl_sub to queue or run 
/home/shujirominami/projects/Pipelines/PreFreeSurfer/PreFreeSurferPipeline.sh
Cannot open volume 
/home/shujirominami/projects/Pipelines_ExampleData/LS2001/unprocessed/3T/T1w_MPR1/LS2001_3T_FieldMap_Magnitude
 for reading!

Shujiro

2018年8月27日 08:02、"Glasser, Matthew" さんのメッセージ:

What about your pipeline call?

Matt.

From: 南 修司郎 
Date: Sunday, August 26, 2018 at 6:00 PM
To: Matt Glasser 
Cc: "hcp-users@humanconnectome.org" 
Subject: Re: [HCP-Users] HCP pipeline for Lifespan Pilot Data

The T1w_MPR1 file includes the followings. Thank you.

LS2001_3T_SpinEchoFieldMap_LR_gdc.nii.gz
LS2001_3T_SpinEchoFieldMap_RL.nii.gz
LS2001_3T_SpinEchoFieldMap_LR.nii.gz
LS2001_3T_T1w_MPR1_gdc.nii.gz
LS2001_3T_SpinEchoFieldMap_RL_gdc.nii.gz
LS2001_3T_T1w_MPR1.nii.gz

Shujiro

2018年8月27日 07:48、"Glasser, Matthew" さんのメッセージ:

List your pipeline call and the files you have available, as I don’t recall 
what was distributed in the pilot data.

Matt.

From:  on behalf of 南 修司郎 

Date: Sunday, August 26, 2018 at 5:45 PM
To: "hcp-users@humanconnectome.org" 
Subject: [HCP-Users] HCP pipeline for Lifespan Pilot Data

Dear HCP experts,

I am trying to perform HCP pipeline for the WU-Minn HCP Lifespan Pilot Data. The 
following error occurred, because WU-Minn HCP Lifespan Pilot Data doesn't have 
"FieldMap_Magnitude" file.

"Cannot open volume 
/home/shujirominami/projects/Pipelines_ExampleData/LS2001/unprocessed/3T/T1w_MPR1/LS2001_3T_FieldMap_Magnitude
 for reading!"

I'd like to appreciate if you could explain the solution.

Best regards.

Shujiro Minami M.D., Ph.D.
Dpt. of Otolaryngology National Tokyo Medical Center
2-5-1 Higashigaoka, Meguro, Tokyo 152-8902, Japan
E-mail shujiromin...@me.com
___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


 
The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.


 
The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.
___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


[HCP-Users] Re:   HCP pipeline for Lifespan Pilot Data

2018-08-26 Thread Glasser, Matthew
What about your pipeline call?

Matt.

From: 南 修司郎 mailto:shujiromin...@me.com>>
Date: Sunday, August 26, 2018 at 6:00 PM
To: Matt Glasser mailto:glass...@wustl.edu>>
Cc: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] HCP pipeline for Lifespan Pilot Data

The T1w_MPR1 file includes the followings. Thank you.

LS2001_3T_SpinEchoFieldMap_LR_gdc.nii.gz
LS2001_3T_SpinEchoFieldMap_RL.nii.gz
LS2001_3T_SpinEchoFieldMap_LR.nii.gz
LS2001_3T_T1w_MPR1_gdc.nii.gz
LS2001_3T_SpinEchoFieldMap_RL_gdc.nii.gz
LS2001_3T_T1w_MPR1.nii.gz

Shujiro

2018年8月27日 07:48、"Glasser, Matthew" 
mailto:glass...@wustl.edu>>さんのメッセージ:

List your pipeline call and the files you have available, as I don’t recall 
what was distributed in the pilot data.

Matt.

From: 
mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of 南 修司郎 mailto:shujiromin...@me.com>>
Date: Sunday, August 26, 2018 at 5:45 PM
To: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: [HCP-Users] HCP pipeline for Lifespan Pilot Data

Dear HCP experts,

I am trying to perform HCP pipeline for the WU-Minn HCP Lifespan Pilot Data. 
The following error occurred, because WU-Minn HCP Lifespan Pilot Data doesn't 
have "FieldMap_Magnitude" file.

"Cannot open volume 
/home/shujirominami/projects/Pipelines_ExampleData/LS2001/unprocessed/3T/T1w_MPR1/LS2001_3T_FieldMap_Magnitude
 for reading!"

I'd like to appreciate if you could explain the solution.

Best regards.

Shujiro Minami M.D., Ph.D.
Dpt. of Otolaryngology National Tokyo Medical Center
2-5-1 Higashigaoka, Meguro, Tokyo 152-8902, Japan
E-mail shujiromin...@me.com

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users




The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.


The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users]   HCP pipeline for Lifespan Pilot Data

2018-08-26 Thread 南 修司郎

The T1w_MPR1 file includes the followings. Thank you.

LS2001_3T_SpinEchoFieldMap_LR_gdc.nii.gz
LS2001_3T_SpinEchoFieldMap_RL.nii.gz
LS2001_3T_SpinEchoFieldMap_LR.nii.gz
LS2001_3T_T1w_MPR1_gdc.nii.gz
LS2001_3T_SpinEchoFieldMap_RL_gdc.nii.gz
LS2001_3T_T1w_MPR1.nii.gz

Shujiro

2018年8月27日 07:48、"Glasser, Matthew" さんのメッセージ:

List your pipeline call and the files you have available, as I don’t recall 
what was distributed in the pilot data.

Matt.

From:  on behalf of 南 修司郎 

Date: Sunday, August 26, 2018 at 5:45 PM
To: "hcp-users@humanconnectome.org" 
Subject: [HCP-Users] HCP pipeline for Lifespan Pilot Data

Dear HCP experts,

I am trying to perform HCP pipeline for the WU-Minn HCP Lifespan Pilot Data. The 
following error occurred, because WU-Minn HCP Lifespan Pilot Data doesn't have 
"FieldMap_Magnitude" file.

"Cannot open volume 
/home/shujirominami/projects/Pipelines_ExampleData/LS2001/unprocessed/3T/T1w_MPR1/LS2001_3T_FieldMap_Magnitude
 for reading!"

I'd like to appreciate if you could explain the solution.

Best regards.

Shujiro Minami M.D., Ph.D.
Dpt. of Otolaryngology National Tokyo Medical Center
2-5-1 Higashigaoka, Meguro, Tokyo 152-8902, Japan
E-mail shujiromin...@me.com
___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


 
The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.
___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users] HCP pipeline for Lifespan Pilot Data

2018-08-26 Thread Glasser, Matthew
List your pipeline call and the files you have available, as I don’t recall 
what was distributed in the pilot data.

Matt.

From: 
mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of 南 修司郎 mailto:shujiromin...@me.com>>
Date: Sunday, August 26, 2018 at 5:45 PM
To: "hcp-users@humanconnectome.org" 
mailto:hcp-users@humanconnectome.org>>
Subject: [HCP-Users] HCP pipeline for Lifespan Pilot Data

Dear HCP experts,

I am trying to perform HCP pipeline for the WU-Minn HCP Lifespan Pilot Data. 
The following error occurred, because WU-Minn HCP Lifespan Pilot Data doesn't 
have "FieldMap_Magnitude" file.

"Cannot open volume 
/home/shujirominami/projects/Pipelines_ExampleData/LS2001/unprocessed/3T/T1w_MPR1/LS2001_3T_FieldMap_Magnitude
 for reading!"

I'd like to appreciate if you could explain the solution.

Best regards.

Shujiro Minami M.D., Ph.D.
Dpt. of Otolaryngology National Tokyo Medical Center
2-5-1 Higashigaoka, Meguro, Tokyo 152-8902, Japan
E-mail shujiromin...@me.com

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


[HCP-Users] HCP pipeline for Lifespan Pilot Data

2018-08-26 Thread 南 修司郎

Dear HCP experts,

I am trying to perform HCP pipeline for the WU-Minn HCP Lifespan Pilot Data. The 
following error occurred, because WU-Minn HCP Lifespan Pilot Data doesn't have 
"FieldMap_Magnitude" file.

"Cannot open volume 
/home/shujirominami/projects/Pipelines_ExampleData/LS2001/unprocessed/3T/T1w_MPR1/LS2001_3T_FieldMap_Magnitude
 for reading!"

I'd like to appreciate if you could explain the solution.

Best regards.

Shujiro Minami M.D., Ph.D.
Dpt. of Otolaryngology National Tokyo Medical Center
2-5-1 Higashigaoka, Meguro, Tokyo 152-8902, Japan
E-mail shujiromin...@me.com
___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users


Re: [HCP-Users] two maximum points using -metric-extrema

2018-08-26 Thread Glasser, Matthew
The other should be in the next map of the ROI file.

Matt.

From: Xinyang Liu mailto:xinyang_ie...@163.com>>
Date: Sunday, August 26, 2018 at 2:41 AM
To: Matt Glasser mailto:glass...@wustl.edu>>
Cc: Timothy Coalson mailto:tsc...@mst.edu>>, HCP 讨论组 
mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] two maximum points using -metric-extrema

Hi, Matt.
Sure. I attached two pictures and two produced GIFTI files here.

In data processing, I first used -metric-extrema to find the maximum point 
within a certain fMRI region. The "maximum_IPS.JPG" attached was among the 
condition that two maximum points were found (please see the two yellow points 
in the first attached picture). The corresponding GIFTI file is 
"L.maxima.func.gii".

Then I continued using the "L.maxima.func.gii" and -metric-rois-from-extrema to 
draw ROIs, the result only showed one created ROI based on one maximum point, 
as the second picture (IPS_ROI.JPG) attached. The "TARGET_ROI_IPS_L.func.gii" 
file is also attached.

I also used the -metric-stats to calculate the vertex number of the created 
ROI, but the result provided two values: 127, 48.

So I am quite confusing about what happened here.

Best regards,
Xinyang



At 2018-08-26 13:03:42, "Glasser, Matthew" 
mailto:glass...@wustl.edu>> wrote:
How about posting some screen captures so we know what is happening?

Matt.

From: Xinyang Liu mailto:xinyang_ie...@163.com>>
Date: Saturday, August 25, 2018 at 11:51 PM
To: Timothy Coalson mailto:tsc...@mst.edu>>
Cc: Matt Glasser mailto:glass...@wustl.edu>>, HCP 讨论组 
mailto:hcp-users@humanconnectome.org>>
Subject: Re: [HCP-Users] two maximum points using -metric-extrema

Dear Tim, dear Matt,

Thank you very much for your helpful answers.

Sorry that I may not described very clearly before. As Tim mentioned, we used 
the -metric-extrema to find the maximum point within a certain region (produce 
"maxima.func.gii" file) and then use the -metric-rois-from-extrema to draw ROIs 
(produced "ROI.func.gii" file).

Then there is a contradictory thing emerged. When we used "wb_command 
-metric-stats ROI.func.gii -reduce -SUM "to count the ROI vertex number, a few 
results showed  two values, which might indicate two ROIs based on the two 
maximum points. We checked the maxima.func.gii files, and found there do 
existed two maximum points in such condition. However, when we looked at the 
created ROI images on Connectome Workbench, we only saw one target ROI drawn on 
the brain surface. This confused us a lot. We don't know whether there were one 
or two ROIs produced. Do you have any suggestions about that? Thanks.

Best regards,
Xinyang



At 2018-08-25 04:16:48, "Timothy Coalson" 
mailto:tsc...@mst.edu>> wrote:
The -metric-extrema command doesn't draw ROIs, it sets single vertices to 1 or 
-1 based on if they are a local maximum or minimum.  By default, if there are 
two equal values that are closer than the search range, then *neither* of them 
will be identified as an extrema.  If they are further then the search range, 
then both may be extrema.

The -consolidate-mode acts somewhat differently - if two equal values are 
touching, neither is treated as an initial extrema, but as long as there is at 
least one vertex separating them, they may both be treated as initial extrema.  
After the initial extrema are found, all extrema that are close to other 
extrema are "consolidated" together.  The details are somewhat complicated, and 
it was implemented by request of others, it is not something that we use.

Tim


On Fri, Aug 24, 2018 at 7:11 AM, Xinyang Liu 
mailto:xinyang_ie...@163.com>> wrote:
Hi, Matt. Thank you very much for your reply.

The extreme point was searched in a certain surface area. Do you mean that even 
there are two maximum points with the same value, they were controlled in a 
limited distance and therefore, the final drawn ROI is a combined region of two 
drawings instead of two separate ones?

Because the problem is that, when I count the total vertex number for each 
created ROI using -metric-stats, a few results showed two values for one ROI.  
I am wondering why this happen and how to deal with that.

Best regards,
Xinyang


At 2018-08-24 19:14:56, "Glasser, Matthew" 
mailto:glass...@wustl.edu>> wrote:
I believe there is a configurable setting that sets the minimum distance 
between extrema.  It is a local min/max that is found.

Matt.

From: 
mailto:hcp-users-boun...@humanconnectome.org>>
 on behalf of Xinyang Liu mailto:xinyang_ie...@163.com>>
Date: Friday, August 24, 2018 at 4:21 AM
To: HCP 讨论组 
mailto:hcp-users@humanconnectome.org>>
Subject: [HCP-Users] two maximum points using -metric-extrema

Dear HCP experts,

Hi. When using workbench command "-metric-extrema" to draw ROI around the 
maximum point of the fMRI surface region, what would happen if there are two 
maximum points? Will the software keep both of them or only keep one? Thanks a 
lot.

Best regards,
Xinyang







Re: [HCP-Users] two maximum points using -metric-extrema

2018-08-26 Thread Xinyang Liu
Hi, Matt.
Sure. I attached two pictures and two produced GIFTI files here. 


In data processing, I first used -metric-extrema to find the maximum point 
within a certain fMRI region. The "maximum_IPS.JPG" attached was among the 
condition that two maximum points were found (please see the two yellow points 
in the first attached picture). The corresponding GIFTI file is 
"L.maxima.func.gii".


Then I continued using the "L.maxima.func.gii" and -metric-rois-from-extrema to 
draw ROIs, the result only showed one created ROI based on one maximum point, 
as the second picture (IPS_ROI.JPG) attached. The "TARGET_ROI_IPS_L.func.gii" 
file is also attached.


I also used the -metric-stats to calculate the vertex number of the created 
ROI, but the result provided two values: 127, 48.


So I am quite confusing about what happened here.


Best regards,
Xinyang





At 2018-08-26 13:03:42, "Glasser, Matthew"  wrote:

How about posting some screen captures so we know what is happening?


Matt.


From: Xinyang Liu 
Date: Saturday, August 25, 2018 at 11:51 PM
To: Timothy Coalson 
Cc: Matt Glasser , HCP 讨论组 
Subject: Re: [HCP-Users] two maximum points using -metric-extrema



Dear Tim, dear Matt,


Thank you very much for your helpful answers.


Sorry that I may not described very clearly before. As Tim mentioned, we used 
the -metric-extrema to find the maximum point within a certain region (produce 
"maxima.func.gii" file) and then use the -metric-rois-from-extrema to draw ROIs 
(produced "ROI.func.gii" file). 


Then there is a contradictory thing emerged. When we used "wb_command 
-metric-stats ROI.func.gii -reduce -SUM "to count the ROI vertex number, a few 
results showed  two values, which might indicate two ROIs based on the two 
maximum points. We checked the maxima.func.gii files, and found there do 
existed two maximum points in such condition. However, when we looked at the 
created ROI images on Connectome Workbench, we only saw one target ROI drawn on 
the brain surface. This confused us a lot. We don't know whether there were one 
or two ROIs produced. Do you have any suggestions about that? Thanks.


Best regards,
Xinyang





At 2018-08-25 04:16:48, "Timothy Coalson"  wrote:

The -metric-extrema command doesn't draw ROIs, it sets single vertices to 1 or 
-1 based on if they are a local maximum or minimum.  By default, if there are 
two equal values that are closer than the search range, then *neither* of them 
will be identified as an extrema.  If they are further then the search range, 
then both may be extrema.


The -consolidate-mode acts somewhat differently - if two equal values are 
touching, neither is treated as an initial extrema, but as long as there is at 
least one vertex separating them, they may both be treated as initial extrema.  
After the initial extrema are found, all extrema that are close to other 
extrema are "consolidated" together.  The details are somewhat complicated, and 
it was implemented by request of others, it is not something that we use.


Tim




On Fri, Aug 24, 2018 at 7:11 AM, Xinyang Liu  wrote:

Hi, Matt. Thank you very much for your reply.


The extreme point was searched in a certain surface area. Do you mean that even 
there are two maximum points with the same value, they were controlled in a 
limited distance and therefore, the final drawn ROI is a combined region of two 
drawings instead of two separate ones? 


Because the problem is that, when I count the total vertex number for each 
created ROI using -metric-stats, a few results showed two values for one ROI.  
I am wondering why this happen and how to deal with that.


Best regards,
Xinyang



At 2018-08-24 19:14:56, "Glasser, Matthew"  wrote:

I believe there is a configurable setting that sets the minimum distance 
between extrema.  It is a local min/max that is found.


Matt.


From:  on behalf of Xinyang Liu 

Date: Friday, August 24, 2018 at 4:21 AM
To: HCP 讨论组 
Subject: [HCP-Users] two maximum points using -metric-extrema



Dear HCP experts,


Hi. When using workbench command "-metric-extrema" to draw ROI around the 
maximum point of the fMRI surface region, what would happen if there are two 
maximum points? Will the software keep both of them or only keep one? Thanks a 
lot.


Best regards,
Xinyang






 

___
HCP-Users mailing list
HCP-Users@humanconnectome.org
http://lists.humanconnectome.org/mailman/listinfo/hcp-users

 

The materials in this message are private and may contain Protected Healthcare 
Information or other information of a sensitive nature. If you are not the 
intended recipient, be advised that any unauthorized use, disclosure, copying 
or the taking of any action in reliance on the contents of this information is 
strictly prohibited. If you have received this email in error, please 
immediately notify the sender via telephone or return mail.





 

___
HCP-Users mailing list