<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=utf-8">
<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:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.E-MailFormatvorlage18
{mso-style-type:personal-reply;
font-family:"Arial",sans-serif;
color:#1F497D;
font-weight:normal;
font-style:normal;}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:"Courier New";
mso-fareast-language:DE;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
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="DE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Hi David,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US">I do have x, y and z values (e.g. as txt file or as a grayscale image):<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:#DADADA">vtkPoints</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#B4B4B4">=</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#4EC9B0">vtkSmartPointer</span><span style="font-family:Consolas;color:#B4B4B4"><</span><span style="font-family:Consolas;color:#4EC9B0">vtkPoints</span><span style="font-family:Consolas;color:#B4B4B4">>::</span><span style="font-family:Consolas;color:#C8C8C8">New</span><span style="font-family:Consolas;color:#B4B4B4">();</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:#DADADA">vtkCells</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#B4B4B4">=</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#4EC9B0">vtkSmartPointer</span><span style="font-family:Consolas;color:#B4B4B4"><</span><span style="font-family:Consolas;color:#4EC9B0">vtkCellArray</span><span style="font-family:Consolas;color:#B4B4B4">>::</span><span style="font-family:Consolas;color:#C8C8C8">New</span><span style="font-family:Consolas;color:#B4B4B4">();</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:#DADADA">vtkDepths</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#B4B4B4">=</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#4EC9B0">vtkSmartPointer</span><span style="font-family:Consolas;color:#B4B4B4"><</span><span style="font-family:Consolas;color:#4EC9B0">vtkDoubleArray</span><span style="font-family:Consolas;color:#B4B4B4">>::</span><span style="font-family:Consolas;color:#C8C8C8">New</span><span style="font-family:Consolas;color:#B4B4B4">();</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:#569CD6">void</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#C8C8C8">addPoint</span><span style="font-family:Consolas;color:#B4B4B4">(</span><span style="font-family:Consolas;color:#569CD6">double</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#7F7F7F">x</span><span style="font-family:Consolas;color:#B4B4B4">,</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#569CD6">double</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#7F7F7F">y</span><span style="font-family:Consolas;color:#B4B4B4">,</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#569CD6">double</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#7F7F7F">z</span><span style="font-family:Consolas;color:#B4B4B4">)</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:#B4B4B4">{</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#4EC9B0">vtkIdType</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#C8C8C8">id</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#B4B4B4">=</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#DADADA">vtkPoints</span><span style="font-family:Consolas;color:#B4B4B4">-></span><span style="font-family:Consolas;color:#C8C8C8">InsertNextPoint</span><span style="font-family:Consolas;color:#B4B4B4">(</span><span style="font-family:Consolas;color:#7F7F7F">x</span><span style="font-family:Consolas;color:#B4B4B4">,</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#7F7F7F">y</span><span style="font-family:Consolas;color:#B4B4B4">,</span><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#7F7F7F">z</span><span style="font-family:Consolas;color:#B4B4B4">);</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#DADADA">vtkDepths</span><span style="font-family:Consolas;color:#B4B4B4">-></span><span style="font-family:Consolas;color:#C8C8C8">InsertNextValue</span><span style="font-family:Consolas;color:#B4B4B4">(</span><span style="font-family:Consolas;color:#7F7F7F">z</span><span style="font-family:Consolas;color:#B4B4B4">);</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#DADADA">vtkCells</span><span style="font-family:Consolas;color:#B4B4B4">-></span><span style="font-family:Consolas;color:#C8C8C8">InsertNextCell</span><span style="font-family:Consolas;color:#B4B4B4">(</span><span style="font-family:Consolas;color:#B5CEA8">1</span><span style="font-family:Consolas;color:#B4B4B4">);</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#DADADA">vtkCells</span><span style="font-family:Consolas;color:#B4B4B4">-></span><span style="font-family:Consolas;color:#C8C8C8">InsertCellPoint</span><span style="font-family:Consolas;color:#B4B4B4">(</span><span style="font-family:Consolas;color:#C8C8C8">id</span><span style="font-family:Consolas;color:#B4B4B4">);</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:gainsboro"> <o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#DADADA">vtkCells</span><span style="font-family:Consolas;color:#B4B4B4">-></span><span style="font-family:Consolas;color:#C8C8C8">Modified</span><span style="font-family:Consolas;color:#B4B4B4">();</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#DADADA">vtkPoints</span><span style="font-family:Consolas;color:#B4B4B4">-></span><span style="font-family:Consolas;color:#C8C8C8">Modified</span><span style="font-family:Consolas;color:#B4B4B4">();</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:gainsboro"> </span><span style="font-family:Consolas;color:#DADADA">vtkDepths</span><span style="font-family:Consolas;color:#B4B4B4">-></span><span style="font-family:Consolas;color:#C8C8C8">Modified</span><span style="font-family:Consolas;color:#B4B4B4">();</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<pre style="background:#1E1E1E"><span style="font-family:Consolas;color:#B4B4B4">}</span><span style="font-family:Consolas;color:gainsboro"><o:p></o:p></span></pre>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal" style="background:#1E1E1E"><span style="font-size:10.0pt;font-family:Consolas;color:#DADADA">vtkDepths</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">-></span><span style="font-size:10.0pt;font-family:Consolas;color:#C8C8C8">SetName</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#D69D85">"DepthArray"</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">);</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:#1E1E1E"><span style="font-size:10.0pt;font-family:Consolas;color:#DADADA">vtkPolyData</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">-></span><span style="font-size:10.0pt;font-family:Consolas;color:#C8C8C8">SetPoints</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#DADADA">m_vtkPoints</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">);</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:#1E1E1E"><span style="font-size:10.0pt;font-family:Consolas;color:#DADADA">vtkPolyData</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">-></span><span style="font-size:10.0pt;font-family:Consolas;color:#C8C8C8">SetVerts</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#DADADA">m_vtkCells</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">);</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:#1E1E1E"><span style="font-size:10.0pt;font-family:Consolas;color:#DADADA">vtkPolyData</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">-></span><span style="font-size:10.0pt;font-family:Consolas;color:#C8C8C8">GetPointData</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">()-></span><span style="font-size:10.0pt;font-family:Consolas;color:#C8C8C8">SetScalars</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#DADADA">m_vtkDepths</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">);</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"><o:p></o:p></span></p>
<p class="MsoNormal" style="background:#1E1E1E"><span style="font-size:10.0pt;font-family:Consolas;color:#DADADA">vtkPolyData</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">-></span><span style="font-size:10.0pt;font-family:Consolas;color:#C8C8C8">GetPointData</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">()-></span><span style="font-size:10.0pt;font-family:Consolas;color:#C8C8C8">SetActiveScalars</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">(</span><span style="font-size:10.0pt;font-family:Consolas;color:#D69D85">"DepthArray"</span><span style="font-size:10.0pt;font-family:Consolas;color:#B4B4B4">);</span><span style="font-size:10.0pt;font-family:Consolas;color:gainsboro"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US">Bea<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Von:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> David Gobbi [mailto:david.gobbi@gmail.com]
<br>
<b>Gesendet:</b> Freitag, 17. Februar 2017 14:57<br>
<b>An:</b> Schober Beatrix [STEMMER IMAGING GmbH] <b.schober@stemmer-imaging.de><br>
<b>Cc:</b> vtkusers@vtk.org<br>
<b>Betreff:</b> Re: [vtkusers] Scaling with VtkTransform and VtkLookupTable<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi Bea,<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">There is something missing from your explanation: how are you setting the scalars for your points? The lookup table maps scalars to colors, and scalars are not changed by vtkTransformFilter.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> - David<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Feb 17, 2017 at 12:50 AM, Schober Beatrix [STEMMER IMAGING GmbH] <<a href="mailto:b.schober@stemmer-imaging.de" target="_blank">b.schober@stemmer-imaging.de</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Good morning!</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I am a bit confused about following behaviour. I tried to find an answer / solution, but spent already more than a
day with that. Maybe the behaviour is correct, I just misunderstand it?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">I have a point cloud (VtkPolyData), using a VtkTransform Filter to scale the z-values. As I want the points to be displayed
colored, I use the vtkLookupTable as well as the ScalarBarWidget to display the lookup table.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Before scaling my z-range is 98 – 255, after scaling (2*) the range is 196 – 510.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">If I do not change the VtkLookupTable’s table range (it is still 98 – 255), the colors are mapped correctly from 196
to 510. If I change the table range to 196 – 510 and the mapper’s scalar range to 196 – 510, in order to get a correct valued ScalarBarWidget (range 196 – 510), only colors from 196 to 255 are mapped, everything else not. (The picker shows the correctly scaled
point data.)</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">My questions: Why is the mapping wrong if I update the scalar range / lookup table range? How can I achieve a correctly
scaled ScalarBarWidget (196 – 510)?</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Thank you very much in advance for your support!</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:10.0pt;font-family:"Arial",sans-serif">Bea</span><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>