Options
How to modify attributes to be ignored in operators
Hi,
I'm programming new operator. Its output is ExampleSet with three attributes. This ExampleSet is add to another one in other operator. Values in the ExampleSet have information character only and shouldn't be processed in next operators. How can I do it?
Operator looks like:
I'm programming new operator. Its output is ExampleSet with three attributes. This ExampleSet is add to another one in other operator. Values in the ExampleSet have information character only and shouldn't be processed in next operators. How can I do it?
Operator looks like:
Hope that is understandable what I mean.
@Override
public void doWork() throws OperatorException {
ImagePlusIOObject IOimage = inImg.getData();
// construct attribute set
Attribute[] attributes = new Attribute[3];
attributes[0] = AttributeFactory.createAttribute("File Name",
Ontology.STRING);
attributes[1] = AttributeFactory.createAttribute("x position",
Ontology.INTEGER);
attributes[2] = AttributeFactory.createAttribute("y position",
Ontology.INTEGER);
MemoryExampleTable table = new MemoryExampleTable(attributes);
char decimalSeperator = '.';
DataRowFactory ROW_FACTORY = new DataRowFactory(0, decimalSeperator);
String[] strings = new String[3];
strings[0] = IOimage.getFileName();
strings[1] = Integer.toString(IOimage.getWindowXPosition());
strings[2] = Integer.toString(IOimage.getWindowYPosition());
// make and add row
DataRow row = ROW_FACTORY.create(strings, attributes);
table.addDataRow(row);
outExSet.deliver(table.createExampleSet());
}
Tagged:
0
Answers
-Gagi