SIVIC API
0.9.26
|
#include <svkAlgorithmPortMapper.h>
Classes | |
struct | svkInputPortInfo |
struct | svkOutputPortInfo |
Public Types | |
enum | svkXMLDataType { SVK_BOOL = 0, SVK_INT, SVK_DOUBLE, SVK_STRING, SVK_IMAGE_DATA, SVK_MR_IMAGE_DATA, SVK_MRS_IMAGE_DATA, SVK_4D_IMAGE_DATA, SVK_XML } |
Public Member Functions | |
vtkTypeMacro (svkAlgorithmPortMapper, vtkObject) | |
void | SetAlgorithm (vtkAlgorithm *algo) |
Set the internal algorithm whos input ports are to be set. More... | |
void | InitializeOutputPort (int port, string name, int type) |
Initialize any output ports. More... | |
vtkAlgorithmOutput * | GetOutputPort (string name) |
Get the output port by name. More... | |
vtkAlgorithmOutput * | GetOutputPort (int port) |
Get the output port by port number. More... | |
int | GetNumberOfOutputPorts () |
Returns the number of output ports. More... | |
string | GetXMLTagForOutputPort (int port) |
Get the xml tag name for the given output port number. More... | |
int | FillOutputPortInformation (int port, vtkInformation *info) |
All ports must be initialized with InitializeOutputPort BEFORE this method is called. More... | |
void | InitializeInputPort (int port, string name, int type, bool required=true, bool repeatable=false) |
This method sets up the inputs for FillInputPortInformation. Must be called before FillInputPortInformation. More... | |
void | SetInputConnection (int port, vtkAlgorithmOutput *output) |
Set the input connection to the internal algorithm. More... | |
int | GetNumberOfInputPorts () |
Returns the number of input ports. More... | |
void | SetInputPortsFromXML (vtkXMLDataElement *element) |
Parses an XML element and uses it to set the input ports of the algorithm. Converts image filename strings to svkImageData objects. More... | |
int | FillInputPortInformation (int port, vtkInformation *info) |
All ports must be initialized with InitializeInputPort BEFORE this method is called. More... | |
void | SetDoubleInputPortValue (int port, double value) |
Basic setter. Wraps value in vtkDataObject subclass. More... | |
svkDouble * | GetDoubleInputPortValue (int port, int connection=0) |
Basic getter. More... | |
void | SetIntInputPortValue (int port, int value) |
Basic setter. Wraps value in vtkDataObject subclass. More... | |
svkInt * | GetIntInputPortValue (int port) |
Basic getter. More... | |
void | SetStringInputPortValue (int port, string value) |
Basic setter. Wraps value in vtkDataObject subclass. More... | |
svkString * | GetStringInputPortValue (int port) |
Basic getter. More... | |
void | SetBoolInputPortValueUsingString (int port, string value) |
Basic setter. Wraps value in vtkDataObject subclass. More... | |
void | SetBoolInputPortValue (int port, bool value) |
Basic setter. Wraps value in vtkDataObject subclass. More... | |
svkBool * | GetBoolInputPortValue (int port) |
Basic getter. More... | |
void | SetXMLInputPortValue (int port, vtkXMLDataElement *value) |
Basic setter. Wraps value in vtkDataObject subclass. More... | |
svkXML * | GetXMLInputPortValue (int port) |
Basic getter. More... | |
void | SetMRImageInputPortValue (int port, string filename) |
Setter that converts a filename into an svkImageData object. More... | |
svkMrsImageData * | GetMRSImageInputPortValue (int port, int connection=0) |
Basic getter. More... | |
void | SetMRSImageInputPortValue (int port, string filename) |
Setter that converts a filename into an svkImageData object. More... | |
svkImageData * | GetImageInputPortValue (int port, int connection=0) |
Basic getter. More... | |
svkMriImageData * | GetMRImageInputPortValue (int port, int connection=0) |
Basic getter. More... | |
string | GetInputPortName (int port) |
Returns string names used to identify the input port. More... | |
string | GetOutputPortName (int port) |
Returns string names used to identify the output port. More... | |
string | GetXMLTagForInputPort (int port) |
Returns string names used in XML configuration files for input port. More... | |
string | GetXMLTagForAlgorithm () |
Returns string names used in XML configuration files for input port. More... | |
bool | GetInputPortRequired (int port) |
Returns true if the port is required. More... | |
bool | GetInputPortRepeatable (int port) |
Returns true if the port is repeatable. More... | |
string | GetXMLInputPortPrefix () |
Get the prefix used for the port definitions in xml. More... | |
void | SetXMLPortPrefix (string prefix) |
Set the prefix used for the port definitions in xml. More... | |
string | GetXMLAlgorithmPrefix () |
Get the prefix used for the port definitions in xml. More... | |
void | SetXMLAlgorithmPrefix (string prefix) |
Set the prefix used for the port definitions in xml. More... | |
string | GetXSD () |
Write the XSD for this port mappper's current initialization. More... | |
virtual vtkDataObject * | GetAlgorithmInputPort (int port, int index=0) |
Handles getting data object input appropriately. More... | |
virtual void | SetAlgorithmInputPort (int port, vtkDataObject *input) |
Handles setting data object input appropriately. More... | |
void | PrintSelf (ostream &os, vtkIndent indent) |
Prints all input parameters set. More... | |
int | GetInputPortNumber (string name) |
Returns the port number for a given parameter string. More... | |
int | GetInputPortType (int port) |
Gets the type for a given input port. More... | |
Static Public Member Functions | |
static svkAlgorithmPortMapper * | New () |
static string | GetClassTypeFromDataType (int type) |
Returns string class name for a given type. More... | |
Protected Member Functions | |
svkAlgorithmPortMapper () | |
~svkAlgorithmPortMapper () | |
Protected Attributes | |
string | portPrefix |
The XML prefix used for the arguments. More... | |
string | algorithmPrefix |
The XML prefix used for the algorithm. More... | |
vector< svkInputPortInfo > | inputPorts |
Stores the names for each parameter. Used to search the XML and print the state. More... | |
vector< svkOutputPortInfo > | outputPorts |
Stores the names for each parameter. Used to search the XML and print the state. More... | |
This class is a helper class that can be used with any vtkAlgorithm. It provides an interface for using the input ports for a vtkAlgorithm to store all the parameters necessary to execute the algorithm. Additionally an XML file can be supplied with the names given to each input port as tags that surround the data to be given to that port. This way an algorithm can be configured and run using a simple XML file. If the data type given is an image, a filename will be assumed and the output of the appropriate reader will be set into the given port. For example if you had four inputs to an algorithm called svkMyAlgorithm and the input ports were named INPUT_IMAGE, PARAMETER_ONE, PARAMETER_TWO, and PARAMETER_THREE, then your XML would appear something like this:
<svkMyAlgorithm>
<INPUT_IMAGE>image.idf</INPUT_IMAGE>
<PARAMETER_ONE>1</PARAMETER_ONE>
<PARAMETER_TWO>1</PARAMETER_TWO>
<PARAMETER_THREE>Data Mask</PARAMETER_THREE>
</svkMyAlgorithm>
This class uses vtkDataObject-wrapped types (svkDouble, svkInt, svkString, svkBool, svkXML) to fill input ports that are not of type vtkDataObject.
enum svkXMLDataType |
|
protected |
|
protected |
int FillInputPortInformation | ( | int | port, |
vtkInformation * | info | ||
) |
All ports must be initialized with InitializeInputPort BEFORE this method is called.
Fills the input port information for all the input ports.
References svkAlgorithmPortMapper::GetClassTypeFromDataType(), and svkAlgorithmPortMapper::inputPorts.
Referenced by svkGenericAlgorithmWithPortMapper::FillInputPortInformation(), svkImageAlgorithmWithPortMapper::FillInputPortInformation(), svkDCEBasicFit::FillInputPortInformation(), and svkImageMathematics::FillInputPortInformation().
int FillOutputPortInformation | ( | int | port, |
vtkInformation * | info | ||
) |
All ports must be initialized with InitializeOutputPort BEFORE this method is called.
Fill the output port information.
References svkAlgorithmPortMapper::GetClassTypeFromDataType(), and svkAlgorithmPortMapper::outputPorts.
Referenced by svkGenericAlgorithmWithPortMapper::FillOutputPortInformation(), svkImageAlgorithmWithPortMapper::FillOutputPortInformation(), svkDCEBasicFit::FillOutputPortInformation(), and svkImageMathematics::FillOutputPortInformation().
|
virtual |
Handles getting data object input appropriately.
Gets a data object from the input port.
Referenced by svkAlgorithmPortMapper::GetBoolInputPortValue(), svkAlgorithmPortMapper::GetDoubleInputPortValue(), svkAlgorithmPortMapper::GetImageInputPortValue(), svkAlgorithmPortMapper::GetIntInputPortValue(), svkAlgorithmPortMapper::GetMRImageInputPortValue(), svkAlgorithmPortMapper::GetMRSImageInputPortValue(), svkAlgorithmPortMapper::GetStringInputPortValue(), svkAlgorithmPortMapper::GetXMLInputPortValue(), svkAlgorithmPortMapper::InitializeInputPort(), svkAlgorithmPortMapper::PrintSelf(), svkAlgorithmPortMapper::SetBoolInputPortValueUsingString(), svkAlgorithmPortMapper::SetIntInputPortValue(), and svkAlgorithmPortMapper::SetStringInputPortValue().
svkBool * GetBoolInputPortValue | ( | int | port | ) |
Basic getter.
Parameter port getter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), and svkAlgorithmPortMapper::SVK_BOOL.
Referenced by svkMrsSingleVoxelSincExtraction::RequestData(), svkMrsSingleVoxelSincExtraction::RequestInformation(), and svkImageMathematics::Update().
|
static |
Returns string class name for a given type.
This method returns the classname associated with a given data type.
References svkAlgorithmPortMapper::SVK_BOOL, svkAlgorithmPortMapper::SVK_DOUBLE, svkAlgorithmPortMapper::SVK_IMAGE_DATA, svkAlgorithmPortMapper::SVK_INT, svkAlgorithmPortMapper::SVK_MR_IMAGE_DATA, svkAlgorithmPortMapper::SVK_MRS_IMAGE_DATA, svkAlgorithmPortMapper::SVK_STRING, and svkAlgorithmPortMapper::SVK_XML.
Referenced by svkAlgorithmPortMapper::FillInputPortInformation(), and svkAlgorithmPortMapper::FillOutputPortInformation().
svkDouble * GetDoubleInputPortValue | ( | int | port, |
int | connection = 0 |
||
) |
Basic getter.
Parameter port getter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), and svkAlgorithmPortMapper::SVK_DOUBLE.
Referenced by svkImageStatistics::ComputeAccumulateStatistics(), svkImageStatistics::ComputeSmoothStatistics(), svkImageThreshold::GetThresholdMax(), svkImageThreshold::GetThresholdMin(), svkMrsSingleVoxelSincExtraction::RequestData(), svkImageThreshold::RequestData(), svkImageStatistics::RequestData(), svkMrsSingleVoxelSincExtraction::RequestInformation(), svkImageMathematics::SetInputPortsFromXML(), and svkImageMathematics::Update().
svkImageData * GetImageInputPortValue | ( | int | port, |
int | connection = 0 |
||
) |
Basic getter.
Simple input port getter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), and svkAlgorithmPortMapper::SVK_IMAGE_DATA.
Referenced by svkObliqueReslice::RequestInformation().
string GetInputPortName | ( | int | port | ) |
Returns string names used to identify the input port.
Returns the name of the given parameter port.
References svkAlgorithmPortMapper::inputPorts.
Referenced by svkAlgorithmPortMapper::GetXMLTagForInputPort(), svkAlgorithmPortMapper::GetXSD(), and svkAlgorithmPortMapper::PrintSelf().
int GetInputPortNumber | ( | string | name | ) |
Returns the port number for a given parameter string.
Returns the port number for the given parameter name. Returns -1 if the port does not exist.
References svkAlgorithmPortMapper::inputPorts.
bool GetInputPortRepeatable | ( | int | port | ) |
Returns true if the port is repeatable.
Returns true of the requested port number is a repeatable port.
References svkAlgorithmPortMapper::inputPorts.
Referenced by svkAlgorithmPortMapper::GetXSD(), and svkAlgorithmPortMapper::SetInputPortsFromXML().
bool GetInputPortRequired | ( | int | port | ) |
Returns true if the port is required.
Returns true of the requested port number is a required port.
References svkAlgorithmPortMapper::inputPorts.
Referenced by svkAlgorithmPortMapper::GetXSD().
int GetInputPortType | ( | int | port | ) |
Gets the type for a given input port.
Returns the type of a given input port parameter.
References svkAlgorithmPortMapper::inputPorts.
Referenced by svkAlgorithmPortMapper::GetBoolInputPortValue(), svkAlgorithmPortMapper::GetDoubleInputPortValue(), svkAlgorithmPortMapper::GetImageInputPortValue(), svkAlgorithmPortMapper::GetIntInputPortValue(), svkAlgorithmPortMapper::GetMRImageInputPortValue(), svkAlgorithmPortMapper::GetMRSImageInputPortValue(), svkAlgorithmPortMapper::GetStringInputPortValue(), svkAlgorithmPortMapper::GetXMLInputPortValue(), svkAlgorithmPortMapper::GetXSD(), svkImageAlgorithmPipeline::InitializeAlgorithmForTag(), svkAlgorithmPortMapper::SetBoolInputPortValue(), svkAlgorithmPortMapper::SetBoolInputPortValueUsingString(), svkAlgorithmPortMapper::SetDoubleInputPortValue(), svkAlgorithmPortMapper::SetIntInputPortValue(), svkAlgorithmPortMapper::SetMRImageInputPortValue(), svkAlgorithmPortMapper::SetMRSImageInputPortValue(), svkAlgorithmPortMapper::SetStringInputPortValue(), and svkAlgorithmPortMapper::SetXMLInputPortValue().
svkInt * GetIntInputPortValue | ( | int | port | ) |
Basic getter.
Parameter port getter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), and svkAlgorithmPortMapper::SVK_INT.
Referenced by svkImageStatistics::ComputeAccumulateStatistics(), svkImageStatistics::ComputeSmoothStatistics(), svkObliqueReslice::GetInterpolationMode(), svkImageThreshold::GetMaskOutputValue(), svkImageThreshold::GetOutputScalarType(), svkImageMathematics::GetOutputType(), svkDCEBasicFit::GetTimepointEnd(), svkDCEQuantify::GetTimepointEnd(), svkDCEBasicFit::GetTimepointStart(), svkDCEQuantify::GetTimepointStart(), svkImageCopy::RequestData(), svkImageThreshold::RequestData(), svkImageStatistics::RequestData(), and svkImageMathematics::Update().
svkMriImageData * GetMRImageInputPortValue | ( | int | port, |
int | connection = 0 |
||
) |
Basic getter.
Simple input port getter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), and svkAlgorithmPortMapper::SVK_MR_IMAGE_DATA.
Referenced by svkImageThreshold::RequestData(), svkImageStatistics::RequestData(), and svkObliqueReslice::RequestInformation().
svkMrsImageData * GetMRSImageInputPortValue | ( | int | port, |
int | connection = 0 |
||
) |
Basic getter.
Simple input port getter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), and svkAlgorithmPortMapper::SVK_MRS_IMAGE_DATA.
int GetNumberOfInputPorts | ( | ) |
Returns the number of input ports.
Gets the number of input ports for the internal algorithm.
int GetNumberOfOutputPorts | ( | ) |
Returns the number of output ports.
Gets the number of output ports for the internal algorithm.
Referenced by svkImageAlgorithmPipeline::InitializeAlgorithmForTag().
vtkAlgorithmOutput * GetOutputPort | ( | string | name | ) |
Get the output port by name.
Get the output of a given port by string name.
References svkAlgorithmPortMapper::outputPorts.
Referenced by svkImageAlgorithmPipeline::InitializeAlgorithmForTag().
vtkAlgorithmOutput * GetOutputPort | ( | int | port | ) |
Get the output port by port number.
Get the output of a given port using its number
string GetOutputPortName | ( | int | port | ) |
Returns string names used to identify the output port.
Returns the name of the given parameter port.
References svkAlgorithmPortMapper::outputPorts.
Referenced by svkAlgorithmPortMapper::GetXSD().
svkString * GetStringInputPortValue | ( | int | port | ) |
Basic getter.
Parameter port getter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), and svkAlgorithmPortMapper::SVK_STRING.
Referenced by svkImageThreshold::GetMaskSeriesDescription(), svkImageStatistics::RequestData(), and svkImageMathematics::Update().
string GetXMLAlgorithmPrefix | ( | ) |
Get the prefix used for the port definitions in xml.
Get the prefix used for the port definitions in xml
References svkAlgorithmPortMapper::algorithmPrefix.
Referenced by svkAlgorithmPortMapper::GetXMLTagForAlgorithm().
string GetXMLInputPortPrefix | ( | ) |
Get the prefix used for the port definitions in xml.
Get the prefix used for the port definitions in xml
References svkAlgorithmPortMapper::portPrefix.
Referenced by svkAlgorithmPortMapper::GetXMLTagForInputPort(), and svkAlgorithmPortMapper::GetXMLTagForOutputPort().
svkXML * GetXMLInputPortValue | ( | int | port | ) |
Basic getter.
Parameter port getter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), and svkAlgorithmPortMapper::SVK_XML.
Referenced by svkImageAlgorithmPipeline::RequestData().
string GetXMLTagForAlgorithm | ( | ) |
Returns string names used in XML configuration files for input port.
Gets the XML tag with the appropriate prefix.
References svkAlgorithmPortMapper::GetXMLAlgorithmPrefix().
string GetXMLTagForInputPort | ( | int | port | ) |
Returns string names used in XML configuration files for input port.
Gets the XML tag with the appropriate prefix.
References svkAlgorithmPortMapper::GetInputPortName(), and svkAlgorithmPortMapper::GetXMLInputPortPrefix().
Referenced by svkAlgorithmPortMapper::SetInputPortsFromXML().
string GetXMLTagForOutputPort | ( | int | port | ) |
Get the xml tag name for the given output port number.
Get the xml tag associated with a given output port.
References svkAlgorithmPortMapper::GetXMLInputPortPrefix(), and svkAlgorithmPortMapper::outputPorts.
Referenced by svkImageAlgorithmPipeline::InitializeAlgorithmForTag().
string GetXSD | ( | ) |
Write the XSD for this port mappper's current initialization.
This generates an complexType tag that can be used in an XSD to validate the xml used to configure the input ports.
References svkAlgorithmPortMapper::GetInputPortName(), svkAlgorithmPortMapper::GetInputPortRepeatable(), svkAlgorithmPortMapper::GetInputPortRequired(), svkAlgorithmPortMapper::GetInputPortType(), svkAlgorithmPortMapper::GetOutputPortName(), svkAlgorithmPortMapper::SVK_BOOL, svkAlgorithmPortMapper::SVK_DOUBLE, svkAlgorithmPortMapper::SVK_IMAGE_DATA, svkAlgorithmPortMapper::SVK_INT, svkAlgorithmPortMapper::SVK_MR_IMAGE_DATA, svkAlgorithmPortMapper::SVK_MRS_IMAGE_DATA, svkAlgorithmPortMapper::SVK_STRING, and svkAlgorithmPortMapper::SVK_XML.
void InitializeInputPort | ( | int | port, |
string | name, | ||
int | type, | ||
bool | required = true , |
||
bool | repeatable = false |
||
) |
This method sets up the inputs for FillInputPortInformation. Must be called before FillInputPortInformation.
This method initializes a given input port. This MUST be called in the constructor of the subclass, and only there before setting any of the inputs.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), and svkAlgorithmPortMapper::inputPorts.
Referenced by svkDCEBasicFit::svkDCEBasicFit(), svkDCEQuantify::svkDCEQuantify(), svkImageAlgorithmPipeline::svkImageAlgorithmPipeline(), svkImageCopy::svkImageCopy(), svkImageMathematics::svkImageMathematics(), svkImageStatistics::svkImageStatistics(), svkImageThreshold::svkImageThreshold(), svkMrsSingleVoxelSincExtraction::svkMrsSingleVoxelSincExtraction(), and svkObliqueReslice::svkObliqueReslice().
void InitializeOutputPort | ( | int | port, |
string | name, | ||
int | type | ||
) |
Initialize any output ports.
Initializes an output port with a given string name.
References svkAlgorithmPortMapper::outputPorts.
Referenced by svkDCEBasicFit::svkDCEBasicFit(), svkDCEQuantify::svkDCEQuantify(), svkImageCopy::svkImageCopy(), svkImageMathematics::svkImageMathematics(), svkImageStatistics::svkImageStatistics(), svkImageThreshold::svkImageThreshold(), and svkObliqueReslice::svkObliqueReslice().
|
static |
void PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
Prints all input parameters set.
PrintSelf method calls parent class PrintSelf, then prints all parameters.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), and svkAlgorithmPortMapper::GetInputPortName().
Referenced by svkGenericAlgorithmWithPortMapper::PrintSelf(), svkImageAlgorithmWithPortMapper::PrintSelf(), and svkImageMathematics::PrintSelf().
void SetAlgorithm | ( | vtkAlgorithm * | algo | ) |
Set the internal algorithm whos input ports are to be set.
Sets the algorithm that the inputs will be mapped to.
Referenced by svkGenericAlgorithmWithPortMapper::GetPortMapper(), svkImageAlgorithmWithPortMapper::GetPortMapper(), svkDCEBasicFit::GetPortMapper(), and svkImageMathematics::GetPortMapper().
|
virtual |
Handles setting data object input appropriately.
Gets a data object into the input port.
Referenced by svkAlgorithmPortMapper::SetBoolInputPortValueUsingString(), svkAlgorithmPortMapper::SetDoubleInputPortValue(), svkAlgorithmPortMapper::SetIntInputPortValue(), svkAlgorithmPortMapper::SetMRImageInputPortValue(), svkAlgorithmPortMapper::SetMRSImageInputPortValue(), svkAlgorithmPortMapper::SetStringInputPortValue(), and svkAlgorithmPortMapper::SetXMLInputPortValue().
void SetBoolInputPortValue | ( | int | port, |
bool | value | ||
) |
Basic setter. Wraps value in vtkDataObject subclass.
Parameter port setter.
References svkAlgorithmPortMapper::GetInputPortType(), svkAlgorithmPortMapper::SetBoolInputPortValueUsingString(), and svkAlgorithmPortMapper::SVK_BOOL.
Referenced by svkObliqueReslice::SetMatchSpacingAndFovOn(), svkMrsSingleVoxelSincExtraction::SetRetainInputExtent(), and svkImageCopy::SetZeroCopy().
void SetBoolInputPortValueUsingString | ( | int | port, |
string | value | ||
) |
Basic setter. Wraps value in vtkDataObject subclass.
Parameter port setter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), svkBool::New(), svkAlgorithmPortMapper::SetAlgorithmInputPort(), and svkAlgorithmPortMapper::SVK_BOOL.
Referenced by svkAlgorithmPortMapper::SetBoolInputPortValue().
void SetDoubleInputPortValue | ( | int | port, |
double | value | ||
) |
Basic setter. Wraps value in vtkDataObject subclass.
Parameter port setter.
References svkAlgorithmPortMapper::GetInputPortType(), svkDouble::New(), svkAlgorithmPortMapper::SetAlgorithmInputPort(), and svkAlgorithmPortMapper::SVK_DOUBLE.
Referenced by svkImageThreshold::SetThresholdMax(), svkImageThreshold::SetThresholdMin(), and svkMrsSingleVoxelSincExtraction::SetVoxelCenter().
void SetInputConnection | ( | int | port, |
vtkAlgorithmOutput * | output | ||
) |
Set the input connection to the internal algorithm.
Set the input connection to a the internal algorithm.
void SetInputPortsFromXML | ( | vtkXMLDataElement * | element | ) |
Parses an XML element and uses it to set the input ports of the algorithm. Converts image filename strings to svkImageData objects.
Extracts input port parameters from an XML element and maps them to the internal algorithm.
References svkAlgorithmPortMapper::GetInputPortRepeatable(), and svkAlgorithmPortMapper::GetXMLTagForInputPort().
Referenced by svkImageAlgorithmPipeline::InitializeAlgorithmForTag(), svkGenericAlgorithmWithPortMapper::SetInputPortsFromXML(), and svkImageAlgorithmWithPortMapper::SetInputPortsFromXML().
void SetIntInputPortValue | ( | int | port, |
int | value | ||
) |
Basic setter. Wraps value in vtkDataObject subclass.
Parameter port setter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), svkInt::New(), svkAlgorithmPortMapper::SetAlgorithmInputPort(), and svkAlgorithmPortMapper::SVK_INT.
Referenced by svkObliqueReslice::SetInterpolationMode(), svkImageThreshold::SetMaskOutputValue(), svkImageCopy::SetOutputDataType(), svkImageThreshold::SetOutputScalarType(), svkImageMathematics::SetOutputType(), svkDCEBasicFit::SetTimepointEnd(), svkDCEQuantify::SetTimepointEnd(), svkDCEBasicFit::SetTimepointStart(), and svkDCEQuantify::SetTimepointStart().
void SetMRImageInputPortValue | ( | int | port, |
string | filename | ||
) |
Setter that converts a filename into an svkImageData object.
Sets an MRI image port. If the input is a filename and a reader will be instantiated to read the file.
References svkImageReaderFactory::CreateImageReader2(), svkUtils::FilePathExists(), svkAlgorithmPortMapper::GetInputPortType(), svkImageReader2::GetOutput(), svkImageReaderFactory::New(), svkAlgorithmPortMapper::SetAlgorithmInputPort(), and svkAlgorithmPortMapper::SVK_MR_IMAGE_DATA.
void SetMRSImageInputPortValue | ( | int | port, |
string | filename | ||
) |
Setter that converts a filename into an svkImageData object.
Sets an MRS image port. If the input is a filename and a reader will be instantiated to read the file.
References svkImageReaderFactory::CreateImageReader2(), svkAlgorithmPortMapper::GetInputPortType(), svkImageReader2::GetOutput(), svkImageReaderFactory::New(), svkAlgorithmPortMapper::SetAlgorithmInputPort(), and svkAlgorithmPortMapper::SVK_MRS_IMAGE_DATA.
void SetStringInputPortValue | ( | int | port, |
string | value | ||
) |
Basic setter. Wraps value in vtkDataObject subclass.
Parameter port setter.
References svkAlgorithmPortMapper::GetAlgorithmInputPort(), svkAlgorithmPortMapper::GetInputPortType(), svkString::New(), svkAlgorithmPortMapper::SetAlgorithmInputPort(), and svkAlgorithmPortMapper::SVK_STRING.
Referenced by svkImageThreshold::SetMaskSeriesDescription(), and svkImageCopy::SetSeriesDescription().
void SetXMLAlgorithmPrefix | ( | string | prefix | ) |
Set the prefix used for the port definitions in xml.
Set the prefix used for the port definitions in xml
References svkAlgorithmPortMapper::algorithmPrefix.
void SetXMLInputPortValue | ( | int | port, |
vtkXMLDataElement * | value | ||
) |
Basic setter. Wraps value in vtkDataObject subclass.
Parameter port setter.
References svkAlgorithmPortMapper::GetInputPortType(), svkXML::New(), svkAlgorithmPortMapper::SetAlgorithmInputPort(), and svkAlgorithmPortMapper::SVK_XML.
void SetXMLPortPrefix | ( | string | prefix | ) |
Set the prefix used for the port definitions in xml.
Set the XML tag prefix for the input/output ports.
References svkAlgorithmPortMapper::portPrefix.
Referenced by svkImageAlgorithmPipeline::svkImageAlgorithmPipeline().
vtkTypeMacro | ( | svkAlgorithmPortMapper | , |
vtkObject | |||
) |
|
protected |
The XML prefix used for the algorithm.
Referenced by svkAlgorithmPortMapper::GetXMLAlgorithmPrefix(), svkAlgorithmPortMapper::SetXMLAlgorithmPrefix(), and svkAlgorithmPortMapper::svkAlgorithmPortMapper().
|
protected |
Stores the names for each parameter. Used to search the XML and print the state.
Referenced by svkAlgorithmPortMapper::FillInputPortInformation(), svkAlgorithmPortMapper::GetInputPortName(), svkAlgorithmPortMapper::GetInputPortNumber(), svkAlgorithmPortMapper::GetInputPortRepeatable(), svkAlgorithmPortMapper::GetInputPortRequired(), svkAlgorithmPortMapper::GetInputPortType(), and svkAlgorithmPortMapper::InitializeInputPort().
|
protected |
Stores the names for each parameter. Used to search the XML and print the state.
Referenced by svkAlgorithmPortMapper::FillOutputPortInformation(), svkAlgorithmPortMapper::GetOutputPort(), svkAlgorithmPortMapper::GetOutputPortName(), svkAlgorithmPortMapper::GetXMLTagForOutputPort(), and svkAlgorithmPortMapper::InitializeOutputPort().
|
protected |
The XML prefix used for the arguments.
Referenced by svkAlgorithmPortMapper::GetXMLInputPortPrefix(), svkAlgorithmPortMapper::SetXMLPortPrefix(), and svkAlgorithmPortMapper::svkAlgorithmPortMapper().