Skip to content
sparse canonical correlation analysis for neuroimaging
C++ Shell R
Find file
New pull request



  Program:   SCCAN
  Module:    master 
  Language:  C++
  Date:      Aug 24, 2011
  Version:   0.1

  Copyright (c) ConsortiumOfANTS. All rights reserved.
  for details.

  This software is distributed WITHOUT ANY WARRANTY; without even
  PURPOSE.  See the above copyright notices for more information.

Version 0.0.  


you will need the ants command line parser utilities and itk to use this.
you can link the above files from ants to the sccan source directory and compile with cmake, linking to itk, which we assume is compiled and available elsewhere.

be sure to compile itk and sccan in Release mode. 


sccan's core features:

* computes true scca, not canonical covariance.

* 2-view and 3-view capabilities. 

* you can control the non-zero fraction for each view.

* you can control whether or not you use positivity constraints for each view.

* permutation based significance estimates for the total correlation and for each weight within each variate.  this gives you some idea of the 'voxel-wise' significance.

* enabling 'partial scca' i.e. scca with covariates (new method).  

an example call:

sccan  --scca two-view[$FA,$TH,$FAMASK,$THMASK,${sparseF},${sparseT}]   -o $pre.nii.gz -p 100

would do 2-view cca on FA and thickness matrices (FA and TH variables) where the region of interest is defined by FAMASK and THMASK variables and non-zero fraction by sparseF and sparseT variables.   you would use 100 permutations (should use 1000s in practice) to test significance.  the output will be the first canonical variates in image format , the permutation-based significance (to standard out) and the voxel-wise significance estimates in image format. 

example variable definitions FA=FA.mhd ;  TH=TH.mhd ; FAMASK=FAmask.nii.gz ; THMASK=THmask.nii.gz ; sparseF=0.5 ; sparseT=0.25 ;  pre=FA_TH_CCA   

if the non-zero fraction variable (sparseX above) is positive, then positivity constraints are enforced.  if it's negative, then we use the abs-val of the constraints to define the nonzero fraction and allow negative weights.

one useful way to define input data for this function is via the meta format. see: 
an example header is here (you would call it FA.mhd) where the raw binary data is in a separate file called FA.raw :
ObjectType = Image
NDims = 2
BinaryData = True
BinaryDataByteOrderMSB = False
CompressedData = False
TransformMatrix = 1 0 0 1
Offset = 0 0
CenterOfRotation = 0 0
ElementSpacing = 1 1
DimSize = 24 60417
AnatomicalOrientation = ??
ElementType = MET_FLOAT
ElementDataFile = FA.raw

as you can see there is extraneous junk that assumes this is an image that you're inputting, even though it's a matrix defining data for 24 subjects where each subject measurement has 60417 entries.

you can also convert a set of images to a matrix that is readable by sccan via:

sccan  --imageset-to-matrix [list.txt,mask.nii.gz] -o  matrix.mhd 

the list.txt should contain one image filename per line and each image should be in the same space as the mask.

see doc directory for additional information
Something went wrong with that request. Please try again.