About tsa_stats_glm.sh

467 views
Skip to first unread message

Bianca

unread,
Mar 21, 2012, 11:52:07 AM3/21/12
to DTI-TK
Hi Gary and group
When I type "tsa_stats_glm.sh"according the usage,then outputs :

applematoMacBook-Pro-2:SHENG_BAO_FANG apple$ tsa_stats_glm.sh
mesh_list_in.txt design_matrix contrast_matrix FA 0.001 10000
ixi_template_cc_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found
ixi_template_left_cst_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found
ixi_template_left_ifo_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found
ixi_template_left_ilf_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found
ixi_template_left_slf_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found
ixi_template_left_unc_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found
ixi_template_right_cst_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found
ixi_template_right_ifo_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found
ixi_template_right_ilf_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found
ixi_template_right_unc_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found
ixi_template_right_ilf_def3.med.maxFA.vtk
/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/
tsa_stats_glm.sh: line 67: -m: command not found

I can not find the error,please help me! Thank you!

Caroline Brun

unread,
Mar 21, 2012, 3:35:40 PM3/21/12
to DTI-TK
Hi Bianca,

Just to make sure, you have installed cmrep, right?
Line 67 of tsa_stats_glm prompts meshglm, which is part of the cmrep
package.
Let me know,
Caroline

张碧云

unread,
Mar 27, 2012, 2:48:19 AM3/27/12
to dt...@googlegroups.com
Hi Caroline,
Where do I install the cmrep? I use Mac system.
Thank you very much!

Bianca





Caroline Brun

unread,
Mar 27, 2012, 4:04:49 PM3/27/12
to dt...@googlegroups.com
Hi Bianca,

Please, follow the installation instructions given here
http://www.itksnap.org/pmwiki/pmwiki.php?n=CMREP.Documentation

Let me know if you have any additional questions,
Caroline.

2012/3/27 张碧云 <biank...@126.com>:

--
Caroline Brun, PhD,
Penn Image Computing and Science Laboratory
Radiology Department, University of Pennsylvania
3600 Market Street, Suite 370
Philadelphia, PA, 19104
tel: +1 215 662 7646
http://picsl.upenn.edu/

张碧云

unread,
Mar 28, 2012, 9:38:04 AM3/28/12
to dt...@googlegroups.com
Hi Caroline,
In the installation of cmrep,whether I need download all  the following library ? 
Before compiling the cmrep code, you need install the following library first: ITK (http://www.itk.org/), VTK (http://www.vtk.org/), PARDISO (http://www.pardiso-project.org/) and the LAPACK library and G2C library.
In order to get the cmrep ,we should download Fink,and Xcode. So many softwares are used in cmrep, which confused with us,  clinical doctors without mathematics knowledge. We are a little frustrated.
Please help us to install the cmrep with some simply tutorials. 

张碧云

unread,
Mar 28, 2012, 9:51:21 AM3/28/12
to dt...@googlegroups.com
Hi Caroline,
If we TSA using existing templates, will we need CMREP?
In our first question in 3/21/2012,we do use the existing templates. In the tutorial of web,

CMREP seems not demanded.
 
Best wish!

Bianca






Caroline Brun

unread,
Mar 28, 2012, 3:07:02 PM3/28/12
to dt...@googlegroups.com
Dear Bianca,

Thanks for following up with us.
Cmrep is indeed needed in the final step of the analysis (see
http://dti-tk.sourceforge.net/pmwiki/pmwiki.php?n=Documentation.TsaCasual
last paragraph "Statistical Analysis"), as it uses a function called
meshglm embedded in the tsa_stats_glm.

Cheers,
Caroline.

2012/3/28 张碧云 <biank...@126.com>:

--

Caroline Brun

unread,
Mar 28, 2012, 3:20:58 PM3/28/12
to dt...@googlegroups.com
Hi again Bianca,

Thank you for your patience and persistence. While you might run into
a few issues while installing these
softwares, I am sure you will manage to and learn a lot on your way!

No problem to help you out here. A few points:
1- what machine do you work with (linux, window, mac?)
2- if you work with linux 64, you can download the binaries here:
http://sourceforge.net/projects/cmrep/files/
3- if not, then I believe you have to build cmrep from the source
code. If you have compiled dti-tk from the source code then you should
have ITK and VTK installed on your machine. If not, then you will have
to go through this but it is not very complicated.
4- Depending on your machine, you could need Pardiso and Lapack, but
we'll solve this later.

Let me know the answers to the questions above and we'll go from there.
Cheers,
Caroline.

2012/3/28 张碧云 <biank...@126.com>:

--

张碧云

unread,
Mar 28, 2012, 10:39:09 PM3/28/12
to dt...@googlegroups.com
Hi Caroline.
Thank you for your help. I work with Mac OS X 10.7. 
There is not binary of cmrep for mac on the web.(http://sourceforge.net/projects/cmrep/files/cmrep/Nightly/

In addition, VTK seems only for Windows.

If I have to build cmrep from the source,which way is not so complicated? (If you have compiled dtitk from the source code then you shouldhave ITK and VTK installed on your machine. If not, then you will have to go through 
this but it is not very complicated)
Please help me to setup the CMREP. Your help is very important for me!
Thank you again!
Best wish!
Bianca






Caroline Brun

unread,
Mar 29, 2012, 3:48:44 PM3/29/12
to dt...@googlegroups.com
Dear Bianca,


You are right, as per my last email, cmrep binaries only exist for linux 64.

So, you will need to compile cmrep. and you need to get
- ITK
- VTK
before being able to compile cmrep

While this seems like a lot of steps, it should not be too complicated
to set up if you follow these steps precisely.
- ITK --> go here: http://www.itk.org/ITK/resources/software.html
1- download the version: InsightToolkit-3.20.1.tar.gz (hosted at SourceForge)
2- untar the package
3- Follow all the steps indicated here:
http://www.itk.org/Wiki/ITK/Insight_Applications
In particular from the paragraph "Build Instruction"

- VTK --> go to http://www.vtk.org/VTK/resources/software.html
1- download version; Download the previous release (5.6.1)
2- untar pakage
3- Compile the code the same way you compiled ITK.
You can get information at http://www.vtk.org/Wiki/VTK#Building_VTK
Focus in particaulr on "Building VTK"

Please go through these and let me know if you have any questions along the way.
Once this is done, then we can go through compiling cmrep.

Cheers,
Caroline.

2012/3/28 张碧云 <biank...@126.com>:

--

张碧云

unread,
Mar 30, 2012, 8:01:12 AM3/30/12
to dt...@googlegroups.com
Hi Caroline,
Thank you for your patience!
I have download the VTK and ITK just as your reply. And then I have Compiled the codes,respectively.
However,while I compiling the CMREP with cmake, I got the following errors :(I have set the path of ITK_DIR and VTK_DIR correctly)

CMake Error at /Users/apple/Downloads/DTI_tools/about cmrep/cmake-2.8.7-Darwin64-universal/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/FindITK.cmake:48 (FIND_PACKAGE):

Could not find a configuration file for package "ITK" that is compatible

with requested version "3.14".

The following configuration files were considered but not accepted:

/Users/apple/Downloads/DTI_tools/ITK/ITKConfig.cmake, version: unknown

Call Stack (most recent call first):

CMakeLists.txt:21 (FIND_PACKAGE)

CMake Error at CMakeLists.txt:22 (INCLUDE):

include called with wrong number of arguments. Include only takes one

file.

CMake Error at /Users/apple/Downloads/DTI_tools/about cmrep/cmake-2.8.7-Darwin64-universal/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/FindVTK.cmake:135 (MESSAGE):

VTK not found. Set the VTK_DIR cmake cache entry to the directory

containing VTKConfig.cmake. This is either the root of the build tree, or

PREFIX/lib/vtk for an installation.

Call Stack (most recent call first):

CMakeLists.txt:25 (FIND_PACKAGE).



Whether I have complied the ITK and VTK wrongly?

I have cmake 2.8.7.

Best wish!
 
Bianca

Caroline Brun

unread,
Mar 30, 2012, 3:48:22 PM3/30/12
to dt...@googlegroups.com
Hi Bianca,

You are right cmrep does not find ITK and VTK.

Can you please describe what were the general steps and commands that
you used to compile either vtk or itk?
Thanks!
Caroline.

2012/3/30 张碧云 <biank...@126.com>:

张碧云

unread,
Mar 31, 2012, 11:33:18 AM3/31/12
to dt...@googlegroups.com
Hi Caroline,
I have downloaded the InsightToolkit-3.20.1.tar.gz (hosted at SourceForge) and vtk-5.6.1.tar, then untag these packages. 
In addition, downloaded the CMREP on the web http://cmrep.cvs.sourceforge.net/viewvc/cmrep/ with Anonymous CVS Access. (cvs-d:pserver:anon...@cmrep.cvs.sourceforge.net:/cvsroot/cmrep login 

cvs -z3 -d:pserver:anon...@cmrep.cvs.sourceforge.net:/cvsroot/cmrep co -P modulename )

And then I with cmake 2.8.7 compile these codes,the steps as follows:
1.  Compiled InsightToolkit-3.20.1: Build a new file in the package of InsightToolkit-3.20.1. Run CMake, pointing it at the top-level of the source directory(InsightToolkit-3.20.1), and browse the path to build.Then press Configure, not changing the default settings: Specify the generator for this project:Unix Makefiles; Use default native compilers;
After the first round,change the  settings of default :
BUILD_SHARED_LIBS ON
BUILD_TESTING OFF
CMAKE_BUILD_TYPE Release
Press 'c' again to configure this selection. After then press Generate.
At last, start the compile,in the -bash:
cd the directory of the  which containing the makefiles. 
Type "make".
After the process of compiling, displaying the errors :
27 warnings and 3 errors generated.
make[2]: *** [Examples/IO/CMakeFiles/IOExamples.dir/IOExamples.o] Error 1
make[1]: *** [Examples/IO/CMakeFiles/IOExamples.dir/all] Error 2
make: *** [all] Error 2

2. And compiled the code of VTK as the same way which compiled ITK, In the last displaying: 1 warning generated.
Linking CXX shared library ../bin/libvtkCharts.dylib
[100%] Built target vtkCharts.
However,I don't know where are wrong. How will do?
Thank you very much
Happy weekend!

Bianca







Caroline Brun

unread,
Apr 2, 2012, 2:42:26 PM4/2/12
to dt...@googlegroups.com
Hi Bianca,

It looks like you were able to configure and compile VTK properly, but
you had trouble compiling ITK.
I am no expert in ITK, but I think you should reconfigure it again
(ccmake step) and set the option BUILD_EXAMPLES to OFF.
Then, compile it (make) and then let me know what happens.

Cheers,
Caroline.

2012/3/31 张碧云 <biank...@126.com>:

--

张碧云

unread,
Apr 3, 2012, 12:01:43 PM4/3/12
to dt...@googlegroups.com
Hi Caroline,
Thank you for your replay! I have tried compiling the ITK again according to your suggestion. In the last, bash display: [100%] Built target ITKFEM. It  looks like configuring and compiling VTK properly.
However,when I compiling the cmrep, the errors always happens as before which display: CMake Error at /Users/apple/Downloads/DTI_tools/about cmrep/cmake-2.8.7-Darwin64-universal/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/FindITK.cmake:48 (FIND_PACKAGE):

Could not find a configuration file for package "ITK" that is compatible

with requested version "3.14".

The following configuration files were considered but not accepted:

/Users/apple/Downloads/DTI_tools/lib/ITK/ITKConfig.cmake, version: unknown

Call Stack (most recent call first):

CMakeLists.txt:21 (FIND_PACKAGE)

CMake Error at CMakeLists.txt:22 (INCLUDE):

include called with wrong number of arguments. Include only takes one

file.

CMake Error at /Users/apple/Downloads/DTI_tools/about cmrep/cmake-2.8.7-Darwin64-universal/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/FindVTK.cmake:135 (MESSAGE):

VTK not found. Set the VTK_DIR cmake cache entry to the directory

containing VTKConfig.cmake. This is either the root of the build tree, or

PREFIX/lib/vtk for an installation.

Call Stack (most recent call first):

CMakeLists.txt:25 (FIND_PACKAGE)

After the first round,change the  settings of default :
>> BUILD_TESTING OFF
>> CMAKE_BUILD_TYPE Release
And selected the directory of ITK_DIR and VTK_DIR which just have been compiled.
I need your help again!
Best wish!
Bianca






Caroline Brun

unread,
Apr 3, 2012, 4:53:38 PM4/3/12
to dt...@googlegroups.com
Hi Bianca,

I have experienced the same problem with cmrep.
Please go to cmrep/CMakeLists.txt

Replace line 20 to 26 by:
# Get ITK
FIND_PACKAGE(ITK REQUIRED)
INCLUDE(${ITK_USE_FILE})

# Get VTK
FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})

And then try to configure and compile again. Let me know how it goes.
Cheers,
Caroline.

2012/4/3 张碧云 <biank...@126.com>:

--

张碧云

unread,
Apr 4, 2012, 11:51:17 AM4/4/12
to dt...@googlegroups.com
Hi Caroline,
   Thank you for your patience! The cmrep was compilied again according to
your suggestion. In the last, bash display: 
1 warning generated. Linking CXX executable vtklevelset
[100%] Built target vtklevelset
 Does it mean that cmrep was configured and compilied  properly? I am not sure. Why the result is target vtklevelset?
If cmrep  configured and compilied  properly, how will I install the cmrep which can be used in TSA.
I am very grateful for your help!
Best wish!

Bianca


张碧云

unread,
Apr 5, 2012, 11:06:53 AM4/5/12
to dt...@googlegroups.com
Hi Caroline,
Good day! I have gone the last step with the DTI tutorials. 
 apple$ tsa_stats_glm.sh mesh_list_in.txt design_matrix contrast_matrix FA 0.001 10000
However, the error displaying: 

ixi_template_cc_def3.med.maxFA
/Users/apple/Downloads/DTI_tools/InsightToolkit3.20.1/Utilities/vxl/core/vnl/vnl_matrix.txx: vnl_matrix<T>::read_ascii: Called with bad stream
vnl_file_matrix: ERROR loading design_matrix
/Users/apple/Downloads/DTI_tools/InsightToolkit3.20.1/Utilities/vxl/core/vnl/vnl_matrix.txx: vnl_matrix<T>::read_ascii: Called with bad stream
vnl_file_matrix: ERROR loading contrast_matrix
Exception caught: Contrast vector must have one row

The other tract displayed the same errors.
Is something  wrong with contrast_matrix and design_matrix?
My design is Subjects Vs Contrasts (using the existing templates). How will design the contrat_matrix and design_matrix? It seems that I does not understand the 
Contrast & Design Matrices Generator correctly.


The hope is just ahead!Thank you very much!

Best wish!

Bianca
                                                


Caroline Brun

unread,
Apr 5, 2012, 4:00:40 PM4/5/12
to dt...@googlegroups.com
Hi Bianca,

Yes, it means that cmrep was configured and compiled correctly.
So, it means that the executables were built correctly, and should be
in one of your directories:
ideally in /usr/local/bin/
if not there, in the directory where you built cmrep and maybe also
within subdirectories (such as YOUR_CMREP_DIR/src/util).
In the second case, please, include the path in your .profile.

I'm glad all our efforts worked!

Cheers,
Caroline.

2012/4/4 张碧云 <biank...@126.com>:

--

Caroline Brun

unread,
Apr 5, 2012, 4:04:12 PM4/5/12
to dt...@googlegroups.com
Hi Bianca,

It seems that the matrix generator needs some fixing.
Can you send me the design and contrast matrices that you generated
together with the number of subjects you have?
I can have a look at it and tell you what is wrong.
Thanks!
C.

2012/4/5 张碧云 <biank...@126.com>:

--

张碧云

unread,
Apr 5, 2012, 10:24:34 PM4/5/12
to dt...@googlegroups.com
Hi Caroline,
My design is Subjects Vs Contrasts (using the existing templates). I selected the Compare Two Groups of Type of Study. I did not change the Type of Values. The contrast_matrix :1 -1 0 0 0 0 .
 And the design_matrix : 1 0 0 0 1 0                                                                                                           0 1 0 1 0 0
However, If I changed the Group of Type of Values as Null, the contrast_matrix is " 1 -1 0 0 " and design_matrix is "1 0 0 1 
                                                                                  0 1 0 2 

What is wrong with the matrix? 
How should I select the Type of Values?
Thank you for your kindness and patience!
Best wish!
Bianca













Caroline Brun

unread,
Apr 6, 2012, 1:24:17 PM4/6/12
to dt...@googlegroups.com
Hi Bianca,

How many patients and controls do you have? Are you trying to remove
any effect (age, disease duration,...) from your analysis?

Cheers,
Caroline.


2012/4/5 张碧云 <biank...@126.com>:

--

张碧云

unread,
Apr 9, 2012, 12:24:45 PM4/9/12
to dt...@googlegroups.com
Hi Caroline,
I have 22 patients and controls respectively. I am trying to analyze  the relationship between clinical assessment (such as disease duration,  functional rating scale) and diffusivity values. The DTI-TK is a tool of group analysis. How to  build the contrast_matrix?

Best wish!
Bianca


Caroline Brun

unread,
Apr 9, 2012, 3:20:14 PM4/9/12
to dt...@googlegroups.com
Hi Bianca,

There are two things here:
- are you trying to compare FA values between patients and controls
and remove certain effect that are common to every subject, such as
age
or
- are you trying to correlate disease duration with FA values in the
patient group only?

Also, to make sure, have you gone through the step prior to the
statistical analysis? See
http://dti-tk.sourceforge.net/pmwiki/pmwiki.php?n=Documentation.TsaCasual,
"Sampling values over all the subjects".

Let me know,
Cheers,
Caroline.

2012/4/9 张碧云 <biank...@126.com>:

--

张碧云

unread,
Apr 11, 2012, 11:30:39 PM4/11/12
to dt...@googlegroups.com
Hi Caroline,
Good day!  About the first thing: I am trying to compare FA values between patients and controls;
The second: I am also trying to correlate disease duration with FA values and other Scalar Indices in the patient group only.

Best wish!

Bianca



Caroline Brun

unread,
Apr 13, 2012, 2:42:05 PM4/13/12
to dt...@googlegroups.com
Hi Bianca,

1- Group comparisons only:
You want a design matrix, that's a text file and is composed of 2
columns representing the two groups. Each row corresponds to a subject
and contains a 0 and a 1 depending on which group the subject
corresponds to. The order of the subjects corresponds to the
dti_volume_list.txt that you used in the previous step, i.e.,
tsa_sampling dti_volume_list.txt tsa_model_path [maxFA or mean]

The contrast matrix is just -1 1

Please see the examples attached, called contrast_group.txt and design_group.txt

2- Correlation between WM scalar values and indices or scores in patients
In this case, the design matrix will be composed of one column
indicating disease duration, one column of 1 (intercept, see general
linear model), and the contrast matrix will be 1 0
(see example contrast_correlation.txt and design_correlation.txt)

Please read http://surfer.nmr.mgh.harvard.edu/fswiki/FsTutorial/GroupAnalysis#DesignMatrix.2BAC8-FSGDFile,
where there is a good and simple explanation
of the general linear model.
Let me know if you have any questions!
Cheers,
Caroline.


2012/4/11 张碧云 <biank...@126.com>:

--

contrast_group.txt
design_group.txt
contrast_correlation.txt
design_correlation.txt

张碧云

unread,
May 21, 2012, 1:49:01 AM5/21/12
to dt...@googlegroups.com
Hi Caroline,
Good day! In part of "Mapping the atlas space data to the subject space",where is the roi_atlas.nii.gz? whether is in the tsa? such as left_cst_filtered_upsampled_mask_manual.nii.gz?

In the part of "IMAGE MAPPING OPTIONS AFTER REGISTRATION", should these steps be repeated for every subject in the studies?

In the part of "Mapping the Population Template to a Template Defining a Standard Space",where is the template defining a standard space ? Is the IIT2 mean2? Which should I select as the template defining a standard space? IIT2mean_FA, IIT2mean_tr or others? 

Cheers,
Bianca.



张碧云

unread,
May 28, 2012, 1:29:12 AM5/28/12
to dt...@googlegroups.com
Hi Caroline,
   Thank you for your help!  

When Mapping the Population Template to a Template Defining a Standard Space:

dti_diffeomorphic_reg template.nii.gz mean_aff.nii.gz template_mask.nii.gz 1 6 0.002

/Users/apple/documents/DTI/dtitk-2.3.0-Darwin-x86_64/scripts/dti_diffeomorphic_reg: line 56:   545 Segmentation fault: 11  piecewiseAtvCGM -template ${template_pref}.nii.gz -subject ${subject_pref}_diffeo.nii.gz -mask ${mask} -ftol ${ftol} -level0 ${level0} -iter ${piter} -SMOption ${SMOption} -prior ${prior} -reg ${reg} -out ${subject_pref}_to_${template_base_pref}.nii.gz
Terminating due to error
What is wrong with it ?
I am very grateful for your help!
Best wish!

Bianca




Hui Zhang

unread,
May 28, 2012, 2:01:50 PM5/28/12
to dt...@googlegroups.com
Hi Bianca,

Can you post the outputs of VolumeInfo for these three volumes?  I wonder if they share the same voxel space.

Gary

张碧云

unread,
May 28, 2012, 10:29:23 PM5/28/12
to dt...@googlegroups.com
Hi Gary,

Good day! These three volumes have shared the same voxel space: 

Volume Info of mean_initial_aff.nii.gz
size: 182x218x182, voxel size: 1x1x1, origin: [-90, 126, 72]

 Volume Info of IIT2mean_mask.nii.gz

size: 182x218x182, voxel size: 1x1x1, origin: [-90, 126, 72]

Volume Info of IIT2mean_FA.nii.gz

size: 182x218x182, voxel size: 1x1x1, origin: [-90, 126, 72]

Best wish!

Bianca


Hui Zhang

unread,
May 29, 2012, 5:57:58 AM5/29/12
to dt...@googlegroups.com
Hi Bianca,

Now I see the issues.  The template, to be compatible with DTI-TK, should have dimensions (sizes) of powers of 2, e.g., 128x128x64 or 128x128x128, and have origins set to [0 0 0].

I have updated the tutorial to provide the steps to convert IIT2 template into what is compatible with DTI-TK.


Hope that helps.

Gary

张碧云

unread,
May 30, 2012, 10:04:34 AM5/30/12
to dt...@googlegroups.com
Hi Gary,
Thank you for your help. When I type the script:
applematoMacBook-Pro-2:mean2 apple$ TVFromEigensystem -in IIT2mean -type FSL
Invalid Option: -in
For usage, use "TVFromEigensystem -help (or -h)"
What is wrong with the -in?
Best wish!

Bianca


Hui Zhang

unread,
May 30, 2012, 12:00:44 PM5/30/12
to dt...@googlegroups.com
Oops.  That's a typo.  I just updated the tutorial with a fix.

Gary

张碧云

unread,
May 31, 2012, 12:31:53 AM5/31/12
to dt...@googlegroups.com
Hi Gary,
Thank you for your patience! When I type the script:
applematoMacBook-Pro-2:tensor_sample apple$ TVTrace -in IIT2mean.nii.gz
-bash: TVTrace: command not found
What is wrong with it?
Best wish!

Bianca






Caroline Brun

unread,
May 31, 2012, 12:39:46 AM5/31/12
to dt...@googlegroups.com
Hi Bianca,

To get the trace from a DT image, you have to use TVtool and not TVTrace.
In your case, it'll be
TVtool -in IIT2mean.nii.gz -tr
The output of it will be a file called IIT2mean_tr.nii.gz

I hope this helps!
Cheers,
Caroline.

Hui Zhang

unread,
May 31, 2012, 12:40:28 AM5/31/12
to dt...@googlegroups.com
Hi Bianca,

Thanks for noting that. That was a command from the previous version of the software. It computes the trace map. So replace it with the equivalent command using TVtool instead.

Gary

张碧云

unread,
May 31, 2012, 1:26:33 AM5/31/12
to dt...@googlegroups.com
Hi Gary and Caroline,
When I type the script: TVtool -in IIT2mean.nii.gz. 
This outputs the IIT2mean_tr.nii.gz. However, the file displayed wrongly,which was attached.

Thank your for your help!
 Best wish!
  
Bianca






IIT2mean_tr.nii.gz

Hui Zhang

unread,
May 31, 2012, 4:37:30 AM5/31/12
to dt...@googlegroups.com
It looks okay to me.  Why do you think it is incorrect?

Gary

张碧云

unread,
May 31, 2012, 1:24:25 PM5/31/12
to dt...@googlegroups.com
Hi Gary,
Good day. It is very strange. The IIT2mean_tr.nii.gz was first displayed wrongly in the Quicklook, which no brain shown. However, when I type the script of TVtool -in IIT2mean.nii.gz again, It looks well. I am so confused.
   When I Visualize Deformation Fields,the wrapped grid showed very strange in the Mricron,which different from the example in the tutorial. The wrapped gridx,gridy and gridz were in the attachment.
 
SVtool -target input.df.nii.gz -grid
deformationScalarVolume -in gridx.nii.gz -out wgridx.nii.gz -trans input.df.nii.gz -target input.df.nii.gz
deformationScalarVolume -in gridy.nii.gz -out wgridy.nii.gz -trans input.df.nii.gz -target input.df.nii.gz
deformationScalarVolume -in gridz.nii.gz -out wgridz.nii.gz -trans input.df.nii.gz -target input.df.nii.gz
In our cases, the output of the script of dfComposition was 1tensor_to_template.df.nii(one of the subjects'),which as the input.df.nii.gz in the scripts of SVtool and  deformationScalarVolume. 

If something were wrong?
 
Best wish!

Bianca




wgridx.nii.gz
wgridy.nii.gz
wgridz.nii.gz

Hui Zhang

unread,
May 31, 2012, 2:06:11 PM5/31/12
to dt...@googlegroups.com
You must be visualizing the combined deformation.  I'd visualize the diffeormphic part only.  When you include the affine transformation that has a large translation, you get what you found.

Gary

张碧云

unread,
Jun 6, 2012, 11:04:33 AM6/6/12
to dt...@googlegroups.com

Hi Gary, 
Good day! I have  completed all the steps of DTI-TK today. I am so happy! Thank you for your all help! 

However,I have some questions:
 First, in part of "Mapping the atlas space data to the subject space", where is the roi_atlas.nii.gz? whether is it in the tsa? The output files do not seem be used in the following steps. What is its role? 

Secondin the steps of "Combined displacement field from the native space to the template space;

Mapping the subject data to the template space

Combined displacement field from the template space to the native space;

", should these steps be repeated for every subject in the studies? which are not mentioned in the tutorial.

The last, in the part of "Tract specific analysis using an existing template",

if the step of Registration repeated the previous registration step?If it is,  however, the script"  dti_warp_to_template_group subjs.txt template.nii.gz 2 2 2 differented from the corresponding step.

if it is not,which is the template used in the "Tract specific analysis using an existing template"?


Cheers, 
Bianca. 






Hui Zhang

unread,
Jun 6, 2012, 2:10:19 PM6/6/12
to dt...@googlegroups.com
Hi Bicanca,

Good day! I have  completed all the steps of DTI-TK today. I am so happy! Thank you for your all help! 

Congratulations!
 
However,I have some questions:
 First, in part of "Mapping the atlas space data to the subject space", where is the roi_atlas.nii.gz? whether is it in the tsa? The output files do not seem be used in the following steps. What is its role? 

The purpose is described in the preceding paragraph, which I quote here:

"This is useful for atlas-based segmentation in which you create some region definition in the atlas space then segment the corresponding region in the subject space by warping."

roi_atlas.nii.gz is the file that stores "the region definition in the atlas space" of your interest.  It can be something you have drawn by hand, computed from tractography,  or downloaded from some some preexisting source.
 
Secondin the steps of "Combined displacement field from the native space to the template space;

Mapping the subject data to the template space

Combined displacement field from the template space to the native space;

", should these steps be repeated for every subject in the studies? which are not mentioned in the tutorial.


If you are going to do this for one subject, it will make sense to do this for all the other ones, won't it?
 

The last, in the part of "Tract specific analysis using an existing template",

if the step of Registration repeated the previous registration step?If it is,  however, the script"  dti_warp_to_template_group subjs.txt template.nii.gz 2 2 2 differented from the corresponding step.

Not sure that I understand your last two questions.  This script automates the steps in your previous question for all the subjects in your group.
 
if it is not,which is the template used in the "Tract specific analysis using an existing template"?
The template with pre-existing TSA models is discussed in the tutorial.

Gary

张碧云

unread,
Jun 7, 2012, 1:32:30 AM6/7/12
to dt...@googlegroups.com
Hi Gary,
Thank you for your patience.
First,about the last question in my previous mail, my means that what are the different between the Registration in the part of "Spatial normalization and atlas construction and the Registration step in the part of  Tract specific analysis using an existing template" (I used your existing template). 
Second,not sure that I understand the tutorial, I wonder if the part of Spatial normalization and atlas construction and the part of Tract specific analysis using an existing template were relatively independent part? 

The last,the outputs of Spatial normalization and atlas construction do not seem be used in the following TSA steps. How to display and analyze the outputs? 

Best wish!

Bianca









Hui Zhang

unread,
Jun 7, 2012, 4:37:21 AM6/7/12
to dt...@googlegroups.com
First,about the last question in my previous mail, my means that what are the different between the Registration in the part of "Spatial normalization and atlas construction and the Registration step in the part of  Tract specific analysis using an existing template" (I used your existing template). 

Remember that spatial normalization and atlas construction is a preprocessing step for some subsequent statistical analysis that you want to carry out, such as voxel-based analysis.  Tract-specific analysis (TSA) is one of such statistical analyses.  So the registration tutorial forms a component of the TSA.  This is explained in the TSA tutorial.  It is worthwhile going through it another time if you have missed this point.
 
Second,not sure that I understand the tutorial, I wonder if the part of Spatial normalization and atlas construction and the part of Tract specific analysis using an existing template were relatively independent part? 

I think I have answered this question with my answers above.
 
The last,the outputs of Spatial normalization and atlas construction do not seem be used in the following TSA steps. How to display and analyze the outputs? 

It is.  Please go through the tutorial a few times if necessary.  There are a lot of information in there.  It will also help a great deal to go through the referenced papers.

Gary

Reply all
Reply to author
Forward
0 new messages