43 #ifndef SVK_ALGORITHM_PORT_MAPPER_H
44 #define SVK_ALGORITHM_PORT_MAPPER_H
47 #include <vtkObject.h>
48 #include <vtkObjectFactory.h>
49 #include <vtkInformation.h>
61 #include <vtkAlgorithmOutput.h>
132 void SetAlgorithm( vtkAlgorithm* algo );
135 void InitializeOutputPort(
int port,
string name,
int type );
138 vtkAlgorithmOutput* GetOutputPort(
string name );
141 vtkAlgorithmOutput* GetOutputPort(
int port );
144 int GetNumberOfOutputPorts( );
147 string GetXMLTagForOutputPort(
int port );
150 int FillOutputPortInformation(
int port, vtkInformation* info );
153 void InitializeInputPort(
int port,
string name,
int type,
bool required =
true,
bool repeatable =
false );
156 void SetInputConnection(
int port, vtkAlgorithmOutput* output );
159 int GetNumberOfInputPorts( );
162 void SetInputPortsFromXML( vtkXMLDataElement* element );
165 int FillInputPortInformation(
int port, vtkInformation* info );
168 void SetDoubleInputPortValue(
int port,
double value );
170 svkDouble* GetDoubleInputPortValue(
int port,
int connection = 0 );
173 void SetIntInputPortValue(
int port,
int value );
175 svkInt* GetIntInputPortValue(
int port );
178 void SetStringInputPortValue(
int port,
string value );
180 svkString* GetStringInputPortValue(
int port);
183 void SetBoolInputPortValueUsingString(
int port,
string value );
185 void SetBoolInputPortValue(
int port,
bool value );
187 svkBool* GetBoolInputPortValue(
int port);
190 void SetXMLInputPortValue(
int port, vtkXMLDataElement* value );
192 svkXML* GetXMLInputPortValue(
int port);
195 void SetMRImageInputPortValue(
int port,
string filename );
198 svkMrsImageData* GetMRSImageInputPortValue(
int port,
int connection = 0);
201 void SetMRSImageInputPortValue(
int port,
string filename );
204 svkImageData* GetImageInputPortValue(
int port,
int connection = 0);
207 svkMriImageData* GetMRImageInputPortValue(
int port,
int connection = 0);
210 string GetInputPortName(
int port );
213 string GetOutputPortName(
int port );
216 string GetXMLTagForInputPort(
int port );
219 string GetXMLTagForAlgorithm( );
222 bool GetInputPortRequired(
int port );
225 bool GetInputPortRepeatable(
int port );
228 string GetXMLInputPortPrefix( );
231 void SetXMLPortPrefix(
string prefix );
234 string GetXMLAlgorithmPrefix( );
237 void SetXMLAlgorithmPrefix(
string prefix );
243 virtual vtkDataObject* GetAlgorithmInputPort(
int port,
int index = 0 );
246 virtual void SetAlgorithmInputPort(
int port, vtkDataObject* input );
249 void PrintSelf( ostream &os, vtkIndent indent );
252 static string GetClassTypeFromDataType(
int type );
255 int GetInputPortNumber(
string name );
258 int GetInputPortType(
int port );
282 void SetInputPortFromXML(
int port, vtkXMLDataElement* parameterElement );
293 #endif //SVK_ALGORITHM_PORT_MAPPER_H
Definition: svkAlgorithmPortMapper.h:111
Definition: svkMrsImageData.h:66
Definition: svkAlgorithmPortMapper.h:108
Definition: svkAlgorithmPortMapper.h:107
int type
Definition: svkAlgorithmPortMapper.h:125
Definition: svkDouble.h:59
string algorithmPrefix
The XML prefix used for the algorithm.
Definition: svkAlgorithmPortMapper.h:269
Definition: svkAlgorithmPortMapper.h:123
vector< svkOutputPortInfo > outputPorts
Stores the names for each parameter. Used to search the XML and print the state.
Definition: svkAlgorithmPortMapper.h:275
vector< svkInputPortInfo > inputPorts
Stores the names for each parameter. Used to search the XML and print the state.
Definition: svkAlgorithmPortMapper.h:272
Definition: svkAlgorithmPortMapper.h:112
Definition: svkAlgorithmPortMapper.h:106
Definition: svkAlgorithmPortMapper.h:110
Definition: svkMriImageData.h:72
Definition: svkAlgorithmPortMapper.h:109
Definition: svkImageData.h:107
string portPrefix
The XML prefix used for the arguments.
Definition: svkAlgorithmPortMapper.h:266
Definition: svkString.h:60
Definition: svkAlgorithmPortMapper.h:99
string name
Definition: svkAlgorithmPortMapper.h:124