<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 10/26/2010 10:37 AM, David Doria wrote:
<blockquote
cite="mid:AANLkTimqdu8JzOMFAdsvGsriqCiVKu6=6Rn38qr-bozM@mail.gmail.com"
type="cite">
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
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>
</blockquote>
David,<br>
<br>
I just wanted a confirmation and I got it!!!<br>
<br>
Thanks for your help, and I will contribute this code on the example
wiki.<br>
<br>
Best,<br>
Arnaud<br>
</body>
</html>