<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Modules%3AAtlasCreator%3ACLI</id>
	<title>Modules:AtlasCreator:CLI - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.slicer.org/w/index.php?action=history&amp;feed=atom&amp;title=Modules%3AAtlasCreator%3ACLI"/>
	<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Modules:AtlasCreator:CLI&amp;action=history"/>
	<updated>2026-04-06T07:23:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://www.slicer.org/w/index.php?title=Modules:AtlasCreator:CLI&amp;diff=19635&amp;oldid=prev</id>
		<title>Haehn: Created page with 'Back to the AtlasCreator documentation..  = AtlasCreator: Commandline Interface =  The Atlas Creator comes with a command line interface. This interface …'</title>
		<link rel="alternate" type="text/html" href="https://www.slicer.org/w/index.php?title=Modules:AtlasCreator:CLI&amp;diff=19635&amp;oldid=prev"/>
		<updated>2011-04-15T00:44:54Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;Back to &lt;a href=&quot;/wiki/Modules:AtlasCreator&quot; title=&quot;Modules:AtlasCreator&quot;&gt;the AtlasCreator documentation&lt;/a&gt;..  = AtlasCreator: Commandline Interface =  The Atlas Creator comes with a command line interface. This interface …&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Back to [[Modules:AtlasCreator|the AtlasCreator documentation]]..&lt;br /&gt;
&lt;br /&gt;
= AtlasCreator: Commandline Interface =&lt;br /&gt;
&lt;br /&gt;
The Atlas Creator comes with a command line interface. This interface can be used by invoking the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# in the source directory&lt;br /&gt;
cd Slicer3/Modules/AtlasCreator/&lt;br /&gt;
&lt;br /&gt;
# or in the build directory&lt;br /&gt;
cd Slicer3-build/lib/Slicer3/Modules/AtlasCreator/&lt;br /&gt;
&lt;br /&gt;
# start the command line interface&lt;br /&gt;
python atlascreator.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Help ==&lt;br /&gt;
&lt;br /&gt;
A detailed help system is available by calling '''python atlascreator.py --help''':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ cd Slicer3-release/lib/Slicer3/Modules/AtlasCreator/atlascreator.py&lt;br /&gt;
$ python atlascreator.py --help&lt;br /&gt;
AtlasCreator for 3D Slicer&lt;br /&gt;
Version v0.4&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
-h, --help&lt;br /&gt;
        Show this information.&lt;br /&gt;
&lt;br /&gt;
-i, --images DIR&lt;br /&gt;
        Directory containing original images.&lt;br /&gt;
&lt;br /&gt;
-s, --segmentations DIR&lt;br /&gt;
        Directory containing segmentations.&lt;br /&gt;
&lt;br /&gt;
-o, --output DIR&lt;br /&gt;
        Output directory.&lt;br /&gt;
&lt;br /&gt;
--cmtk&lt;br /&gt;
        Use the CMTK toolkit for registration and resampling, instead of BRAINSFit.&lt;br /&gt;
        The CMTK4Slicer extensions have to be installed in order to use CMTK.&lt;br /&gt;
&lt;br /&gt;
--skipRegistration&lt;br /&gt;
        Skip the registration and use existing transforms.&lt;br /&gt;
&lt;br /&gt;
        The following arguments have to be specified if the registration is skipped:&lt;br /&gt;
&lt;br /&gt;
        --transforms DIR&lt;br /&gt;
                Directory containing existing transforms.&lt;br /&gt;
&lt;br /&gt;
        --existingTemplate FILEPATH&lt;br /&gt;
                Filepath to an existing template used for resampling only.&lt;br /&gt;
&lt;br /&gt;
--dynamic&lt;br /&gt;
        Use a dynamic template for registration based on means of images.&lt;br /&gt;
&lt;br /&gt;
        The following arguments have to be specified if dynamic registration is chosen:&lt;br /&gt;
&lt;br /&gt;
        -m, --meanIterations INT&lt;br /&gt;
                Number of iterations to compute and register against a mean image.&lt;br /&gt;
&lt;br /&gt;
--fixed&lt;br /&gt;
        Use a fixed template for registration.&lt;br /&gt;
&lt;br /&gt;
        The following arguments have to be specified if fixed registration is chosen:&lt;br /&gt;
&lt;br /&gt;
        --template FILEPATH&lt;br /&gt;
                Filepath to an image used as a template for fixed registration.&lt;br /&gt;
&lt;br /&gt;
        --ignoreTemplateSegmentation&lt;br /&gt;
                If activated, the template's segmentation will not be added to the atlases.&lt;br /&gt;
&lt;br /&gt;
-n, --non-rigid&lt;br /&gt;
        Use Non-Rigid registration additionally.&lt;br /&gt;
&lt;br /&gt;
-w, --writeTransforms&lt;br /&gt;
        Write transforms to output directory.&lt;br /&gt;
&lt;br /&gt;
--keepAligned&lt;br /&gt;
        Keep the aligned images and segmentations.&lt;br /&gt;
&lt;br /&gt;
-l, --labels STRING&lt;br /&gt;
        List of labels to include for the atlases, f.e. &amp;quot;3 4 5 6 8 10&amp;quot;.&lt;br /&gt;
        DEFAULT: detect labels automatically&lt;br /&gt;
&lt;br /&gt;
--normalize&lt;br /&gt;
        Normalize Atlases to 0..1.&lt;br /&gt;
        If activated, the output cast will be set to Double.&lt;br /&gt;
&lt;br /&gt;
        --normalizeTo INT&lt;br /&gt;
                The upper value to normalize the atlases to.&lt;br /&gt;
                DEFAULT: 1&lt;br /&gt;
&lt;br /&gt;
--outputCast INT&lt;br /&gt;
        Output cast for the atlases. Possible values:&lt;br /&gt;
        0: Char&lt;br /&gt;
        1: Unsigned Char&lt;br /&gt;
        2: Double&lt;br /&gt;
        3: Float&lt;br /&gt;
        4: Int&lt;br /&gt;
        5: Unsigned Int&lt;br /&gt;
        6: Long&lt;br /&gt;
        7: Unsigned Long&lt;br /&gt;
        8: Short&lt;br /&gt;
        9: Unsigned Short&lt;br /&gt;
        DEFAULT: 8&lt;br /&gt;
&lt;br /&gt;
-c, --cluster&lt;br /&gt;
        Use the cluster mode.&lt;br /&gt;
&lt;br /&gt;
        The following arguments have to be specified if cluster mode is chosen:&lt;br /&gt;
&lt;br /&gt;
        --schedulerCommand EXECUTABLE&lt;br /&gt;
                The executable to use as a scheduler in cluster mode, f.e. &amp;quot;qsub&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
--pca&lt;br /&gt;
        Perform PCA Analysis on top of Resampling.&lt;br /&gt;
&lt;br /&gt;
        --pcaMaxEigenVectors INT&lt;br /&gt;
                The number of maximal Eigenvectors to use for model generation.&lt;br /&gt;
                DEFAULT: 10&lt;br /&gt;
&lt;br /&gt;
        --pcaCombine&lt;br /&gt;
                Combine the PCA output.&lt;br /&gt;
&lt;br /&gt;
--slicer FILEPATH&lt;br /&gt;
        Filepath to the 3D Slicer launcher including arguments, f.e. &amp;quot;/usr/bin/Slicer3 --tmp_dir /var/tmp&amp;quot;.&lt;br /&gt;
        DEFAULT: Find the 3D Slicer launcher automatically.&lt;br /&gt;
&lt;br /&gt;
-d, --debug&lt;br /&gt;
        Enable debug information.&lt;br /&gt;
&lt;br /&gt;
--dryrun&lt;br /&gt;
        Output executable commands instead of running the registration or resampling.&lt;br /&gt;
&lt;br /&gt;
--examples&lt;br /&gt;
        Show usage examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Developed by Daniel Haehn and Kilian Pohl, University of Pennsylvania. The research was funded by an ARRA supplement to NIH NCRR (P41 RR13218).&lt;br /&gt;
&lt;br /&gt;
Thanks to everyone!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ python atlascreator.py --examples&lt;br /&gt;
AtlasCreator for 3D Slicer&lt;br /&gt;
Version v0.4&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
-----------------------------------------------------------------------------------------------&lt;br /&gt;
1. Run fixed registration with the testdata and normalize the atlases to 1:&lt;br /&gt;
&lt;br /&gt;
        python atlascreator.py -i TestData/originals/ -s TestData/segmentations/ -o /tmp/acout --fixed --template TestData/originals/case62.nrrd -w -l &amp;quot;3 4 5 6 7 8 9&amp;quot; --normalize&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------------------------&lt;br /&gt;
2. Run fixed registration with the testdata and use CMTK instead of BRAINSFit and label auto-detection:&lt;br /&gt;
&lt;br /&gt;
        python atlascreator.py -i TestData/originals/ -s TestData/segmentations/ -o /tmp/acout --fixed --template TestData/originals/case62.nrrd -w --cmtk&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------------------------&lt;br /&gt;
3. Run dynamic registration with the testdata and normalize the atlases to 0..100:&lt;br /&gt;
&lt;br /&gt;
        python atlascreator.py -i TestData/originals/ -s TestData/segmentations/ -o /tmp/acout --dynamic --meanIterations 5 -w -l &amp;quot;3 4 5 6 7 8 9&amp;quot; --normalize --normalizeTo 100&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------------------------&lt;br /&gt;
4. Run dynamic registration with the testdata on a cluster (scheduler command &amp;quot;qsub -l centos5&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
        python atlascreator.py -i TestData/originals/ -s TestData/segmentations/ -o /tmp/acout --dynamic --meanIterations 5 -w -l &amp;quot;3 4 5 6 7 8 9&amp;quot; --normalize --cluster --schedulerCommand &amp;quot;qsub -l centos5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------------------------&lt;br /&gt;
5. Use existing registrations and just re-sample&lt;br /&gt;
&lt;br /&gt;
        python atlascreator.py --skipRegistration --transforms /tmp/acout --existingTemplate TestData/segmentations/case62.nrrd -s TestData/segmentations/ -o /tmp/acout -l &amp;quot;3 4 5 6 7 8 9&amp;quot; --normalize --outputCast 3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Haehn</name></author>
		
	</entry>
</feed>