Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLAtlasCreatorNode.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See Doc/copyright/copyright.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8  Program: 3D Slicer
9  Module: $RCSfile: vtkMRMLAtlasCreatorNode.h,v $
10  Date: $Date: 2006/03/19 17:12:29 $
11  Version: $Revision: 1.3 $
12 
13 =========================================================================auto=*/
14 #ifndef __vtkMRMLAtlasCreatorNode_h
15 #define __vtkMRMLAtlasCreatorNode_h
16 
17 #include "vtkMRML.h"
18 #include "vtkMRMLNode.h"
19 
20 #include "vtkSlicerAtlasCreatorModuleLogicExport.h"
21 
22 // Description:
23 // The atlas creator node is simply a MRMLNode container for
24 // a configuration of the Atlas Creator module
25 
26 class VTK_SLICER_ATLASCREATOR_MODULE_LOGIC_EXPORT vtkMRMLAtlasCreatorNode : public vtkMRMLNode
27 {
28  public:
29  static vtkMRMLAtlasCreatorNode *New();
31  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
32 
33  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
34 
35  // Description:
36  // Set node attributes
37  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
38 
39  // Description:
40  // Write this node's information to a MRML file in XML format.
41  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
42 
43  // Description:
44  // Copy the node's attributes to this object
45  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
46 
47  // Description:
48  // Get node XML tag name (like Volume, Model)
49  virtual const char* GetNodeTagName() VTK_OVERRIDE
50  {return "AtlasCreator";}
51 
52  enum
53  {
54  LaunchComputationEvent = 31337
55  };
56 
57  // Description: Initialize the configuration with default values
58  // The default values are:
59  // - all input and output filePaths, filePathLists and labelLists to ""
60  // - Toolkit: BRAINSFit
61  // - Template Type: Fixed
62  // - DynamicTemplateIterations: 5
63  // - Affine Registration
64  // - Save Transforms and keep aligned images
65  // - Deactivate Normalization including all settings
66  // - Deactivate PCA including all settings
67  // - Deactivate Cluster including all settings
68  // - Deactivate SkipRegistration including all settings
69  // - Deactivate Debug and Dryrun Mode
70  void InitializeByDefault();
71 
72  // Description: Launch the Atlas Creator computation with the assigned parameters
73  void Launch();
74 
75  // Description: The originalImages FilePaths divided by space
76  vtkGetStringMacro (OriginalImagesFilePathList);
77  vtkSetStringMacro (OriginalImagesFilePathList);
78 
79  // Description: The segmentation FilePaths divided by space
80  vtkGetStringMacro (SegmentationsFilePathList);
81  vtkSetStringMacro (SegmentationsFilePathList);
82 
83  // Description: The output Directory
84  vtkGetStringMacro (OutputDirectory);
85  vtkSetStringMacro (OutputDirectory);
86 
87 
88  // Description: The Toolkit: "BRAINSFit" or "CMTK"
89  vtkGetStringMacro (Toolkit);
90  vtkSetStringMacro (Toolkit);
91 
92 
93  // Description: The Template Type: "fixed", "dynamic" or "group"
94  vtkGetStringMacro (TemplateType);
95  vtkSetStringMacro (TemplateType);
96 
97  // Description: The Number of Iterations for DynamicTemplate
98  vtkGetMacro(DynamicTemplateIterations,int);
99  vtkSetMacro(DynamicTemplateIterations,int);
100 
101  // Description: The Default Case FilePath for FixedTemplate
102  vtkGetStringMacro (FixedTemplateDefaultCaseFilePath);
103  vtkSetStringMacro (FixedTemplateDefaultCaseFilePath);
104 
105  // Description: 1: Ignore the template segmentation in fixed mode 0: Don't ignore
106  vtkGetMacro(IgnoreTemplateSegmentation,int);
107  vtkSetMacro(IgnoreTemplateSegmentation,int);
108 
109  // Description: The Labels divided by space
110  vtkGetStringMacro (LabelsList);
111  vtkSetStringMacro (LabelsList);
112 
113 
114  // Description: The Registration Type: "Rigid","Affine","Affine12" or "Non-Rigid"
115  // Affine12 means 12 DOF
116  vtkGetStringMacro (RegistrationType);
117  vtkSetStringMacro (RegistrationType);
118 
119 
120  // Description: 1: Save Transforms 0: Don't save
121  vtkGetMacro(SaveTransforms,int);
122  vtkSetMacro(SaveTransforms,int);
123 
124  // Description: 1: Delete Aligned Images 0: Don't delete
125  vtkGetMacro(DeleteAlignedImages,int);
126  vtkSetMacro(DeleteAlignedImages,int);
127 
128  // Description: 1: Delete Aligned Segmentations 0: Don't delete
129  vtkGetMacro(DeleteAlignedSegmentations,int);
130  vtkSetMacro(DeleteAlignedSegmentations,int);
131 
132  // Description: 1: Normalize Atlases 0: Don't normalize
133  vtkGetMacro(NormalizeAtlases,int);
134  vtkSetMacro(NormalizeAtlases,int);
135 
136  // Description: Set NormalizeTo Value
137  vtkGetMacro(NormalizeTo,int);
138  vtkSetMacro(NormalizeTo,int);
139 
140 
141  // Description: The Output Cast
142  // "char"
143  // "unsigned char"
144  // "double"
145  // "float"
146  // "int"
147  // "unsigned int"
148  // "long"
149  // "unsigned long"
150  // "short"
151  // "unsigned short"
152  vtkGetStringMacro (OutputCast);
153  vtkSetStringMacro (OutputCast);
154 
155 
156  // Description: 1: Use PCA Analysis 0: Don't use PCA Analysis
157  vtkGetMacro(PCAAnalysis,int);
158  vtkSetMacro(PCAAnalysis,int);
159 
160  // Description: The Number of Max EigenVectors to use for PCA Analysis
161  vtkGetMacro(PCAMaxEigenVectors,int);
162  vtkSetMacro(PCAMaxEigenVectors,int);
163 
164  // Description: 1: Combine all PCA output 0: Don't combine all PCA output
165  vtkGetMacro(PCACombine,int);
166  vtkSetMacro(PCACombine,int);
167 
168 
169  // Description: 1: Use Cluster 0: Don't use cluster
170  vtkGetMacro(UseCluster,int);
171  vtkSetMacro(UseCluster,int);
172 
173  // Description: The Scheduler Command
174  vtkGetStringMacro (SchedulerCommand);
175  vtkSetStringMacro (SchedulerCommand);
176 
177 
178  // Description: The number of threads to use for Registration and Resampling, -1: Use Maximum Number of Threads
179  vtkGetMacro(NumberOfThreads,int);
180  vtkSetMacro(NumberOfThreads,int);
181 
182 
183  // Description: 1: Skip Registration 0: Don't skip registration
184  vtkGetMacro(SkipRegistration,int);
185  vtkSetMacro(SkipRegistration,int);
186 
187  // Description: The Existing Template (Filepath)
188  vtkGetStringMacro (ExistingTemplate);
189  vtkSetStringMacro (ExistingTemplate);
190 
191  // Description: The Transforms Directory
192  vtkGetStringMacro (TransformsDirectory);
193  vtkSetStringMacro (TransformsDirectory);
194 
195 
196  // Description: 1: Use DRAMMS on top of Registration and Resampling 0: Don't use DRAMMS
197  vtkGetMacro(UseDRAMMS,int);
198  vtkSetMacro(UseDRAMMS,int);
199 
200 
201  // Description: 1: Use Debug Mode 0: Don't use Debug Mode
202  vtkGetMacro(DebugMode,int);
203  vtkSetMacro(DebugMode,int);
204 
205  // Description: 1: Use Dryrun Mode 0: Don't use Dryrun Mode
206  vtkGetMacro(DryrunMode,int);
207  vtkSetMacro(DryrunMode,int);
208 
209  // Description: 1: Use Test Mode 0: Don't use Test Mode
210  vtkGetMacro(TestMode,int);
211  vtkSetMacro(TestMode,int);
212 
213 protected:
214 
218 
219  char *Toolkit;
220 
225 
226  char *LabelsList;
227 
229 
235 
236  char *OutputCast;
237 
241 
244 
246 
250 
252 
255 
256  // the testmode is only for internal use and will not be saved to MRML
257  int TestMode;
258 
259 
260 private:
264  void operator=(const vtkMRMLAtlasCreatorNode&);
265 
266 };
267 
268 #endif
269 
void operator=(const vtkMRMLNode &)
virtual vtkMRMLNode * CreateNodeInstance()=0
Create instance of the default node. Like New only virtual.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:135