<div dir="ltr"><p dir="ltr">Thanks for your helpful hints, So here is roughly how my code looks now:</p><div style="font-size:12.8px">Labels = Model.GetPolyData().GetPointData()</div><div style="font-size:12.8px">Label1 = Labels.GetArray(1)  /* Label1(name:alpha) and Label2(name:betha) are vtkfloatarray */</div><div style="font-size:12.8px">Label2 = Labels.GetArray(2)</div><div style="font-size:12.8px">calc = vtkArrayCalculator()</div><div style="font-size:12.8px">calc.AddScalarArrayName('alpha')</div><div style="font-size:12.8px">calc.AddScalarArrayName('betha')</div><div style="font-size:12.8px">calc.SetFunction('betha+alpha') // I am not sure if "+" will concatenate these two arrays??</div><p>And in almost every example of vtkArrayCalculator, there is a SetInputConnection function to be assigned that I couldn't find what to import! Neither Model or any of it's members have a GetOutputPort. </p><p dir="ltr"> Alternative to this could be using vtkConcatenateArray. I wonder why that is not available in the slicer!? <a href="http://www.vtk.org/doc/release/5.10/html/classvtkConcatenateArray.html" target="_blank">http://www.vtk.org/doc/release/5.10/html/classvtkConcatenateArray.html</a></p>
<div class="gmail_quote">On Oct 12, 2015 6:16 PM, "Andras Lasso" <<a href="mailto:lasso@queensu.ca" target="_blank">lasso@queensu.ca</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div>
<div>
<div style="font-family:Calibri,sans-serif;font-size:11pt">You can get the vtkPolyData object from the model node. You then follow VTK documentation to process the data, add attributes, etc. If you add a new scalar point attribute then you can choose to show
 it in the Models module.<br>
<br>
There are multiple detailed examples and tests, even in Python, that demonstrate the use of vtkArrayCalculator: <a href="http://www.vtk.org/doc/nightly/html/classvtkArrayCalculator.html" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkArrayCalculator.html</a><br>
<br>
A Slicer module that operates on point attributes in a model node:<br>
<a href="https://github.com/SlicerIGT/SlicerIGT/blob/master/Experimental/TexturedMesh/TexturedMesh.py" target="_blank">https://github.com/SlicerIGT/SlicerIGT/blob/master/Experimental/TexturedMesh/TexturedMesh.py</a><br>
<br>
Andras</div>
</div>
<div dir="ltr">
<hr>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">From:
</span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:saeedbakhshmand@gmail.com" target="_blank">Saeed Mahdizadeh Bakhshmand</a></span><br>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Sent:
</span><span style="font-family:Calibri,sans-serif;font-size:11pt">‎2015-‎10-‎12 14:43</span><br>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">To:
</span><span style="font-family:Calibri,sans-serif;font-size:11pt"><a href="mailto:slicer-devel@bwh.harvard.edu" target="_blank">SPL Slicer Devel</a></span><br>
<span style="font-family:Calibri,sans-serif;font-size:11pt;font-weight:bold">Subject:
</span><span style="font-family:Calibri,sans-serif;font-size:11pt">[slicer-devel] Array Calculator to combine two vtk arrays</span><br>
<br>
</div>
<div>
<div dir="ltr">Hello,
<div><br>
</div>
<div>Would some body please walk me through how to code concatenating two vtkfloatarrays using vtkArrayCalculator (or any other possible way)? </div>
<div><br>
</div>
<div>Thanks,</div>
<div>SMB</div>
</div>
</div>
</div>

</blockquote></div>
</div>