<meta http-equiv="content-type" content="text/html; charset=utf-8"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div bgcolor="#ffffff" text="#000000">
<div><div class="h5">I have tried to set a color (see attached code), but I still need to
remove the active scalar array ?</div></div>
<br>
Arnaud<br></div></blockquote><div><br></div><div>What you've done there is correct.</div><div><br></div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; "><div>
A couple of comments:</div><div><br></div><div> sphere->GetCellData()->SetScalars( data );</div><div> sphere->GetCellData()->SetActiveScalars( "data" );</div><div><br></div><div>I believe The second line is redundant. Setting the scalars automatically sets that array to active.</div>
<div><br></div><div>That is:</div><div><br></div><div><div> sphere->GetCellData()->SetScalars( data );</div><div><br></div><div>is equivalent to:</div><div><br></div><div> sphere->GetCellData()->AddArray(data );</div>
</div><div> sphere->GetCellData()->SetActiveScalars( "data" );</div><div><br></div><div>Also,</div><div><br></div><div> sphere->GetCellData()->SetActiveScalars( "" );</div><div><br>
</div><div>and this:</div><div><br></div><div> sphere->GetCellData()->SetActiveScalars(NULL);</div><div><br></div><div>I believe do the same thing. In your program, calling either of them turns off the coloring by 'data'. The color that is displayed is the SetColor(t,t,t) (which is what I think you want no?).</div>
<div><br></div><div>Last thing - the preferred method of connecting filters is:</div><div><span class="Apple-style-span" style="font-size: 12.5px; "><br></span></div><div><span class="Apple-style-span" style="font-size: 12.5px; ">mapper->SetInputConnection( sphere->GetOutputPort() );</span></div>
<div><br></div><div>rather than</div><div><br></div><div><span class="Apple-style-span" style="font-size: 12.5px; ">mapper->SetInput( sphere );</span></div><div><br></div><div>If I am still missing your problem, please let me know.</div>
<div><br></div></span><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 12.5px; border-collapse: collapse; color: rgb(136, 136, 136); ">David</span> </div></div>