How to modify attributes to be ignored in operators

StaryVena
StaryVena New Altair Community Member
edited November 5 in Community Q&A
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:

@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());
}
Hope that is  understandable what I mean.

Answers

  • dragoljub
    dragoljub New Altair Community Member
    I have always used set role to change the name into something custom. That way its a special operator but not a label or id that may be misinterpreted.  ;D

    -Gagi