<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Thank you all,<br>
<br>
Finally, I found a way to achieve what I wanted to do in
overriding function <i>MapScalars</i> of <i>vtkLookupTable</i>,
so i'm now be able to manage custom color mapping.<br>
<br>
Kind regards,<br>
Frédéric<br>
<br>
Le 04/12/2012 10:27, Johannes Strecha a écrit :<br>
</div>
<blockquote
cite="mid:CAHS-q+AY-=xqD-GptemhZUwm4Qkc-YriyJWgT4TCRS9Cw4YG0A@mail.gmail.com"
type="cite">Hello,<br>
<br>
the vtk reference says that the vtkClipDataSet filter can be
configured to produce a second output, namely the part that was
clipped away. A pipeline with two clip-filters (for upper and
lower bounds) that produce the clipped part as second outputs and
three mappers with suitably set color transfer functions should
produce the desired results.<br>
<br>
However, I also think that one should be able to achieve this
result with a more simple setup.<br>
<br>
Kind regards,<br>
Johannes Strecha.<br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Dec 4, 2012 at 9:57 AM, Deric
Stone <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:dstone@medis.nl" target="_blank">dstone@medis.nl</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="white" link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Where
are you using the lookup table? Can you use
vtkColorTransferFunction or
vtkDiscretizableColorTransferFunction instead? There
you would be able to specify ranges.</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Note
that GetColor(…) and MapValue(…) are not declared
virtual in the vtkLookupTable class so cannot be
overridden.</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"
lang="NL">Kind regards,</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"
lang="NL">Deric Stone</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></p>
<div>
<div style="border:none;border-top:solid #b5c4df
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
<a moz-do-not-send="true"
href="mailto:vtkusers-bounces@vtk.org"
target="_blank">vtkusers-bounces@vtk.org</a>
[mailto:<a moz-do-not-send="true"
href="mailto:vtkusers-bounces@vtk.org"
target="_blank">vtkusers-bounces@vtk.org</a>]
<b>On Behalf Of </b>Frédéric Speisser<br>
<b>Sent:</b> Monday, December 03, 2012 6:20 PM<br>
<b>To:</b> Johannes Strecha<br>
<b>Cc:</b> <a moz-do-not-send="true"
href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
<b>Subject:</b> Re: [vtkusers] color mapping</span></p>
</div>
</div>
<div>
<div class="h5">
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Thank you Johannes for your
answer,<br>
<br>
Yes, I know this algorithm, I also use it to
filter data.<br>
But here my aim is not to filter data
out-of-range but to keep these data visible but
set in a custom color.<br>
<br>
Kind regards,<br>
Frédéric<br>
<br>
Le 03/12/2012 18:12, Johannes Strecha a écrit :</p>
</div>
<blockquote
style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hello,<br>
<br>
I can't give you a direct answer, but I think
what you want can be done with the
vtkClipDataSet filter (5.8). See the reference
for details. I assume that adjusting the lookup
table would work faster, though.<br>
<br>
When trying to realize a "filled contour plot"
by adjusting the lookup table (to a series of
steps) I experienced that some interpolation was
performed nonetheless and I ended up with
blurred filled contours. Maybe this would also
happen in your case.<br>
<br>
Kind regards,<br>
Johannes Strecha.</p>
<div>
<p class="MsoNormal"
style="margin-bottom:12.0pt"> </p>
<div>
<p class="MsoNormal">On Mon, Dec 3, 2012 at
5:31 PM, Frédéric Speisser <<a
moz-do-not-send="true"
href="mailto:speisser@kappaeng.com"
target="_blank">speisser@kappaeng.com</a>>
wrote:</p>
<div>
<p class="MsoNormal">Hi all,<br>
<br>
<br>
I'm using <i>vtkLookupTable::SetTableRange</i>
to remap colors of a LUT to a custom range
of a given scalar values. <br>
<br>
This works great but per default and as
explained in API documentation :<br>
<i>Scalar values less than minimum range
value are clamped to minimum range
value. Scalar values greater than
maximum range value are clamped to
maximum range value.<br>
</i>So values out of range are displayed
in minimum range value color (for those
under custom range) and in maximum range
value color (for those over custom range).<br>
I would like to display out-of-range
values in a custom color, so that for
example all values under and over custom
range are displayed in black.<br>
I began to write a class <i>MyVtkLookupTable</i>
which inherits from <i>vtkLookupTable </i>and
i tried to override <i>GetColor(double v,
double rgb[3])</i> and <i>MapValue(double
v)</i> to be able to override color
displayed but it seems not to work.<br>
Is it possible to do that by overriding
vtk classes ? If yes, which method/classes
should I override ?<br>
<br>
Any clues are wellcome, thank you,<br>
<br>
<br>
<br>
Frédéric </p>
</div>
<p class="MsoNormal"
style="margin-bottom:12.0pt">
<br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true"
href="http://www.kitware.com"
target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at
<a moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the
VTK FAQ at: <a moz-do-not-send="true"
href="http://www.vtk.org/Wiki/VTK_FAQ"
target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://www.vtk.org/mailman/listinfo/vtkusers"
target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a></p>
</div>
<p class="MsoNormal"> </p>
</div>
</blockquote>
<p class="MsoNormal"> </p>
</div>
</div>
</div>
</div>
<br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true"
href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a
moz-do-not-send="true"
href="http://www.kitware.com/opensource/opensource.html"
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a
moz-do-not-send="true"
href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a moz-do-not-send="true"
href="http://www.vtk.org/mailman/listinfo/vtkusers"
target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>