<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hello all,</div>

<div>&nbsp;</div>

<div>I want to add specific color to part of the surface of a volume data. For that I first use vtkExtractVOI to get the part I want, then get the surface by calling vtkMarchingCubes. Now, if I try then to addScalars to its Output I can&#39;t.</div>

<div>&nbsp;</div>

<div>Here is the code:</div>

<div>&nbsp;</div>

<div>Instantiate(colors,vtkUnsignedCharArray); ...</div>

<div>Instantiate(colorLookupTable, vtkLookupTable); ...</div>

<div>&nbsp;</div>

<div>
<div>&nbsp;&nbsp;&nbsp; Instantiate(brainsection, vtkExtractVOI);<br/>
&nbsp;&nbsp; &nbsp;brainsection-&gt;SetInput(imageData);<br/>
&nbsp;&nbsp; &nbsp;brainsection-&gt;SetVOI(minIJK[0],maxIJK[0],minIJK[1],maxIJK[1], minIJK[2],maxIJK[2]);<br/>
&nbsp;&nbsp; &nbsp;brainsection-&gt;Update();</div>

<div>&nbsp;</div>

<div>&nbsp;&nbsp; &nbsp;Instantiate( brainsectionMC, vtkMarchingCubes );<br/>
&nbsp;&nbsp; &nbsp;brainsectionMC-&gt;SetValue(0,1);<br/>
&nbsp;&nbsp; &nbsp;brainsectionMC-&gt;SetInput( brainsection-&gt;GetOutput() );<br/>
&nbsp;&nbsp; &nbsp;brainsectionMC-&gt;Update();</div>

<div><br/>
&nbsp;&nbsp; &nbsp;Instantiate(brainsectionLocator, vtkPointLocator);<br/>
&nbsp;&nbsp; &nbsp;brainsectionLocator-&gt;SetDataSet(brainsectionMC-&gt;GetOutput());<br/>
&nbsp;&nbsp; &nbsp;brainsectionLocator-&gt;BuildLocator();</div>
&nbsp;

<div>&nbsp;&nbsp;&nbsp; brainsectionMC-&gt;GetOutput()-&gt;GetPointData(); // And here I would like to call -&gt;SetScalars(colors); but I get the error:<br/>
&nbsp;&quot;error C2027: use of undefined type &#39;vtkPointData&#39;&quot;. But even I copy this pointData to some new Instance of vtkPointData I get the same error.</div>

<div>&nbsp;</div>

<div>Does anyone know why or how I should do this?</div>

<div>Thanks,</div>

<div>Susi</div>

<div>&nbsp;</div>
</div>

<div>&nbsp;</div></div></body></html>