Difference between revisions of "Projects:ARRA:SlicerEM:AtlasCreator:PCA"
From NAMIC Wiki
(Created page with '= PCA functionality for the Atlas Creator = This content describes the PCA functionality of KilisSandbox. == Create environment for pcaModelling on Mac == <pre> $ tcsh % cd /U…') |
|||
Line 12: | Line 12: | ||
== pcaModelling Help == | == pcaModelling Help == | ||
+ | === Main === | ||
<pre> | <pre> | ||
$ pcaModelling | $ pcaModelling | ||
Line 41: | Line 42: | ||
Error: Currently function "" is not implemented | Error: Currently function "" is not implemented | ||
============================ End MathImage ======================= | ============================ End MathImage ======================= | ||
+ | </pre> | ||
+ | |||
+ | === Distance functionality === | ||
+ | <pre> | ||
+ | $ pcaModelling -HELP distance | ||
+ | Slicer home is /Users/daniel/SLICER/TRUNK/Slicer3-build | ||
+ | ============================ Start PCADistance ======================= | ||
+ | Always look at vtkEMPrivateSegment/projects/iccv05/TestExample to see example structure | ||
+ | Now can read in raw data with extension .img | ||
+ | load multiple volumes by doing -pr "<dir>/*/prefix" eg case*/I.001 - 001 is important bc file has to exist | ||
+ | |||
+ | To transfere the labelmap into a distance map according to the PCA model please define the following values: | ||
+ | -path = where should the file be save to | ||
+ | -volume = defines the labelmap | ||
+ | -va (first) = defines the label of interest | ||
+ | -va (second) = Maximum value in the distance map in Euclidean norm (e.g. 100) | ||
+ | -va (third) = Distance value of boundary (e.g. 10) | ||
+ | </pre> | ||
+ | |||
+ | === Generate functionality === | ||
+ | <pre> | ||
+ | $ pcaModelling -HELP generate | ||
+ | Slicer home is /Users/daniel/SLICER/TRUNK/Slicer3-build | ||
+ | ============================ Start PCADistance ======================= | ||
+ | Always look at vtkEMPrivateSegment/projects/iccv05/TestExample to see example structure | ||
+ | Now can read in raw data with extension .img | ||
+ | load multiple volumes by doing -pr "<dir>/*/prefix" eg case*/I.001 - 001 is important bc file has to exist | ||
+ | |||
+ | To generate the PCA the training data has to be organized the following way | ||
+ | <PATH>/case*/<STRUCTURES>/I | ||
+ | where | ||
+ | -path defines <PATH> | ||
+ | the different subjects have to be named case<No> | ||
+ | -list defines the different <STRUCTURES> | ||
+ | e.g. /projects/iccv05/TestExample/TestEMPCASeg/PCATraining/distance/case1/Background/I.* | ||
+ | with -path = /projects/iccv05/TestExample/TestEMPCASeg/PCATraining/distance and -list (Background Foreground) | ||
+ | In addition: | ||
+ | -max defines the maximum number of Eigenvectors to compute | ||
+ | -full defines the full image range, e.g. 1 124, where PCA might only be computed for 40 90 | ||
+ | The results will be located in <PATH>/PCA<STRUCTURES> | ||
+ | -combine = define all structures in one PCA model (= 1) or define a PCA model for each structure independently (=0) | ||
+ | -va do you want to normalize the mean distance map so that it is a real distance map (generally a bad idea) | ||
+ | |||
</pre> | </pre> |
Revision as of 20:34, 10 March 2011
Home < Projects:ARRA:SlicerEM:AtlasCreator:PCAContents
PCA functionality for the Atlas Creator
This content describes the PCA functionality of KilisSandbox.
Create environment for pcaModelling on Mac
$ tcsh % cd /Users/daniel/SLICER/TRUNK/Slicer3/Modules/KilisSandbox/scripts % source setEnvironment % /Users/daniel/SLICER/TRUNK/Slicer3-build/Slicer3 --launch xterm
pcaModelling Help
Main
$ pcaModelling Slicer home is /Users/daniel/SLICER/TRUNK/Slicer3-build ============================ Start PCADistance ======================= Always look at vtkEMPrivateSegment/projects/iccv05/TestExample to see example structure Now can read in raw data with extension .img load multiple volumes by doing -pr "<dir>/*/prefix" eg case*/I.001 - 001 is important bc file has to exist ============================= General Options -ld = load data - default: "1" -pr = file prefix (mandatory) -p2 = file prefix of second Volume -sv = saving output in file formate (sli, img, hdr (analyze), nhdr or nrrd (NRRD), mhd or mha (Meta), nii (Nifti), vtk) - default: nrrd -va = value for function, default: 0.0 ============================= -fc = function (mandatory) - possibilities: distance = Turns a labelmap into a distance map as needed for PCA modelling (*) generate = Generate the PCA model from the training data (*) model = Turns PCA analysis into 3D models (*) parameter = Extracts the PCA shape parameters from a shape representation (e.g. distance map) (*) representation = Determines the shape representation from the PCA shape parameters (*) view = View the PCA model (*) -HELP = help function If the description of a function has (*) then execute -HELP <function> for more detail, e.g. mathImage -HELP com Error: Currently function "" is not implemented ============================ End MathImage =======================
Distance functionality
$ pcaModelling -HELP distance Slicer home is /Users/daniel/SLICER/TRUNK/Slicer3-build ============================ Start PCADistance ======================= Always look at vtkEMPrivateSegment/projects/iccv05/TestExample to see example structure Now can read in raw data with extension .img load multiple volumes by doing -pr "<dir>/*/prefix" eg case*/I.001 - 001 is important bc file has to exist To transfere the labelmap into a distance map according to the PCA model please define the following values: -path = where should the file be save to -volume = defines the labelmap -va (first) = defines the label of interest -va (second) = Maximum value in the distance map in Euclidean norm (e.g. 100) -va (third) = Distance value of boundary (e.g. 10)
Generate functionality
$ pcaModelling -HELP generate Slicer home is /Users/daniel/SLICER/TRUNK/Slicer3-build ============================ Start PCADistance ======================= Always look at vtkEMPrivateSegment/projects/iccv05/TestExample to see example structure Now can read in raw data with extension .img load multiple volumes by doing -pr "<dir>/*/prefix" eg case*/I.001 - 001 is important bc file has to exist To generate the PCA the training data has to be organized the following way <PATH>/case*/<STRUCTURES>/I where -path defines <PATH> the different subjects have to be named case<No> -list defines the different <STRUCTURES> e.g. /projects/iccv05/TestExample/TestEMPCASeg/PCATraining/distance/case1/Background/I.* with -path = /projects/iccv05/TestExample/TestEMPCASeg/PCATraining/distance and -list (Background Foreground) In addition: -max defines the maximum number of Eigenvectors to compute -full defines the full image range, e.g. 1 124, where PCA might only be computed for 40 90 The results will be located in <PATH>/PCA<STRUCTURES> -combine = define all structures in one PCA model (= 1) or define a PCA model for each structure independently (=0) -va do you want to normalize the mean distance map so that it is a real distance map (generally a bad idea)