<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-IE link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Dear All,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I am trying to use VTK in its Activiz format (version 5.8.0) in C#. It is working reasonably well 9very well in places) – but I am trying to do some visualisation of vector data. I have been trying for a week now (or more) doing online searches for sample code etc. to no avail.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Ideally what I would like to achieve was described in this article on ParaView: <a href="https://blog.kitware.com/paraview-technique-curved-and-nicely-spaced-arrow-glyphs/">https://blog.kitware.com/paraview-technique-curved-and-nicely-spaced-arrow-glyphs/</a> Beautiful work, but the description of how it was achieved is somewhat cryptic when viewed from the perspective of trying to replicate it in Activiz.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If I could get one of the following visualisation tools developed it would be fit for my purpose:<o:p></o:p></p><p class=MsoNormal>1. Ideal – as per the link above.<o:p></o:p></p><p class=MsoNormal>2. Flow arrow glyphs that are coloured and scaled according to the vector field magnitude.<o:p></o:p></p><p class=MsoNormal>3. Minimum: Standard streamtracer lines with colour according to vector magnitude.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>For test purposes I am reading in a set of data points in 3D with pressure values (a history) for each point. I am meshing the points into a linear tet mesh (using VTK class - <span style='font-size:9.5pt;font-family:Consolas;color:black'>vtkDelaunay3D</span>) and then extract the resulting mesh as a vtkUnstructuredGrid. Then I am using the pressure field to calculate a pressure gradient at the nodes (points) of the tet mesh. As the pressure data has a set of values for a series of timesteps, the resulting gradient values are also per node per timestep. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I associate the pressure data and the resulting gradient data with the vtkUnstructuredGrid (called <span style='font-size:9.5pt;font-family:Consolas;color:black'>_vtkUSGrid</span>) as follows:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>//===========================================================================</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>//===========================================================================</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>void</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> AddDataSet(RiverDataSet dataset)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>switch</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> (dataset.Type) </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>// POINT or CELL</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>case</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"POINT"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _vtkUSGrid.GetPointData().AddArray(dataset.Values);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>break</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>case</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"CELL"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _vtkUSGrid.GetCellData().AddArray(dataset.Values);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>break</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _vtkUSGrid.Update();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _vtkUSGrid.Modified();<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Where dataset is a class that I have written to manage various data sets. Note all data sets (scalars and vector) are added in this manner. The resulting scalar (e.g. pressure) visualisation works perfectly. In addition, I manage to extract the streamtracers from the data and can see the evolution of that vector field in time. The vtkStreamTracer (which I refer to as streamlines in the code) are created as follows:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>//===========================================================================</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>//===========================================================================</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>private</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>void</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> CreateStreamLine()<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamTracer = </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>new</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> vtkStreamTracer();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamTracer.SetInput(_USGrid);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _FlowPlaneSource = </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>new</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> vtkPlaneSource();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamTracer.SetSourceConnection(_FlowPlaneSource.GetOutputPort());<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>double</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> Initial_and_minimum_step = 0.05; </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>// 5% of cell size</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamTracer.SetInitialIntegrationStep(Initial_and_minimum_step);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamTracer.SetMaximumPropagation(100);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamTracer.SetIntegrationDirectionToBackward();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamTracer.SetIntegratorTypeToRungeKutta45();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamTracer.SetComputeVorticity(</span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>true</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>//vtkContourFilter contourFilter = new vtkContourFilter();</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>//contourFilter.SetInputArrayToProcess(StreamTracer.)</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>//contourFilter.SetInputConnection(StreamTracer.GetOutputPort());</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamTube = </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>new</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> vtkTubeFilter();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamTube.SetInput(StreamTracer.GetOutput());<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>//_StreamTube.SetInput(contourFilter.GetOutput());</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamTube.SetNumberOfSides(12);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamTube.SetVaryRadiusToVaryRadiusByVector();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> vtkPolyDataMapper StreamLineMapper = vtkPolyDataMapper.New();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamLineMapper.SetInput(_StreamTube.GetOutput());<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamLineMapper.ScalarVisibilityOn();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamLineMapper.SetScalarModeToUsePointData();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> StreamLineMapper.SetLookupTable(_ColourMap_LUT);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor = </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>new</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> vtkActor();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.SetMapper(StreamLineMapper);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> AddActor(_StreamlineActor);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.VisibilityOff();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> CreateStreamlinePointLocator();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> }<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Note that in this code I have made an attempt (but commented it out) to introduce contours on the streamlines as a first step to achieve the ideal objective (as stated above) – but as I can’t even get them to come out in colour the attempt at creating definite (line) contours is futile for the moment.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Each time I change timestep I set the data upon which the stream lines are to be calculated to the appropriate set of gradients:<o:p></o:p></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>//===========================================================================</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>//===========================================================================</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>private</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>void</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> UpDate_FlowActor(</span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>string</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> Type, </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>bool</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> bRender = </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>false</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>switch</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> (Type)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>case</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"NONE"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>: </span><span style='font-size:9.5pt;font-family:Consolas;color:green'>// No data set visible</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.VisibilityOff();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>break</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>case</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"POINT"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _USGrid.GetPointData().SetActiveVectors(_DataSet.CurrentVectorDataSet.Name);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.GetMapper().SelectColorArray(_DataSet.CurrentVectorDataSet.Name);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.GetMapper().GetInput().GetPointData().SetActiveVectors(_DataSet.CurrentVectorDataSet.Name);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:green'>// _StreamlineActor.GetMapper().ColorByArrayComponent(_DataSet.CurrentVectorDataSet.Name, 0);</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.GetMapper().SetColorModeToMapScalars();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>break</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>case</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:#A31515'>"CELL"</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _USGrid.GetCellData().SetActiveVectors(_DataSet.CurrentVectorDataSet.Name);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.GetMapper().SelectColorArray(_DataSet.CurrentVectorDataSet.Name);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.GetMapper().GetInput().GetCellData().SetActiveVectors(_DataSet.CurrentVectorDataSet.Name);<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:green'>// _StreamlineActor.GetMapper().ColorByArrayComponent(_DataSet.CurrentVectorDataSet.Name, 0);</span><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.GetMapper().SetColorModeToMapScalars();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>break</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>default</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>:<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.VisibilityOff();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>break</span><span style='font-size:9.5pt;font-family:Consolas;color:black'>;<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> _StreamlineActor.Modified();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'><o:p> </o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> </span><span style='font-size:9.5pt;font-family:Consolas;color:blue'>if</span><span style='font-size:9.5pt;font-family:Consolas;color:black'> (bRender)<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> {<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> ReRender();<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> }<o:p></o:p></span></p><p class=MsoNormal style='text-autospace:none'><span style='font-size:9.5pt;font-family:Consolas;color:black'> }<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Any advice would be most welcomed. (And I can supply any additional code – but the overall project is too large to share).<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Many thanks in advance,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Kind regards,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Jim Robinson PhD<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>