<html><head><base href="x-msg://6/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hey Daniel,<div><br></div><div>There seems to be something wrong with the painting for vtkAxis when used by itself in a scene. I'm not sure why we don't see this behavior when these axes are used within the charts. Hopefully Marcus will be able to take a look. You can see the problem even in the attached simple Python script.</div><div><br></div><div>One thing I noticed that maybe Marcus can comment on: Things like vtkChartXY do an Update on themselves before Paint. If in this script you don't call Update explicitly on the axis objects they paint the axis line and title, but not the ticks and their labels. Maybe it would be good to add and Update call at the beginning of vtkAxis::Paint?</div><div><br></div><div>Daniel, something you might want to consider instead of the method you're using now is a trick others are using for vtkScalarsToColorsItem and its subclasses: they make a subclass of vtkPlot which has a vtkImageData as a private Texture variable, and then paints the texture within the plot's bounds. This way they can instantiate a vtkChartXY and use AddPlot() to add what is basically an image painter, and then vtkChartXY takes care of the axes internally. Just an idea that I've seen the developers using.</div><div><br></div><div>Anyway, hopefully Marcus or someone else will be able to take a look at this sometime soon, but I know he's very busy right now.</div><div><br></div><div>Talk to you later,</div><div>-Eric</div><div><br></div><div># =======</div><div><div>import vtk</div><div><br></div><div>view = vtk.vtkContextView()</div><div>view.GetRenderWindow().SetSize(400, 300)</div><div><br></div><div>axis1 = vtk.vtkAxis()</div><div>axis1.SetPoint1(75,75)</div><div>axis1.SetPoint2(75,225)</div><div>axis1.SetPosition(vtk.vtkAxis.LEFT)</div><div>axis1.SetTitle('YAxis')</div><div>axis1.Update()</div><div>view.GetScene().AddItem(axis1)</div><div><br></div><div>axis2 = vtk.vtkAxis()</div><div>axis2.SetPoint1(75,75)</div><div>axis2.SetPoint2(325,75)</div><div>axis2.SetPosition(vtk.vtkAxis.BOTTOM)</div><div>axis2.SetTitle('XAxis')</div><div>axis2.Update()</div><div>view.GetScene().AddItem(axis2)</div><div><br></div><div>view.Render()</div><div>view.GetInteractor().Start()</div><div><div># =======</div><div></div></div><div><div><br></div><div><img id="bc273b7a-daab-4d00-88a0-5cae2d2232c7" height="402" width="480" apple-width="yes" apple-height="yes" src="cid:79024439-2D71-4EC4-B361-EED4690A2267@trinity.duke.edu"></div><div>On Dec 7, 2010, at 10:46 AM, Frese Daniel Dr. wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div lang="DE" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="WordSection1" style="page: WordSection1; "><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">Hi Eric,<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">here it is, or at least the relevant part.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">I’m sorry it’s a bit lengthy, even though I omitted some stuff around. I did this<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">in the Visual Studio and created a WinForms control (which by the way worked nicely),<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">so “this” points to an instance of the form in order to get the dimensions of the output window.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">The double locdata array and the dimensions of the image etc. are stored in private elements of the<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">WinForm control.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">This is basically my first effort with these routines in order to try out things,<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">so I wouldn’t be surprised if things can be done in a better way. I put the axes<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">in a different scene in order to work around some strange things when using vtk 5.6.1,<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">but now I am using the latest git stuff (or nearly, I downloaded yesterday afternoon)<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">and there is no need any more for any workarounds (vtk & life has become better<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Wingdings; ">J</span><span lang="EN-US" style="font-family: Calibri, sans-serif; ">).<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">Placing the axes into the view’s scene does not change their behavior however (I tested).<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">Thank you very much for your interest in this !<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; ">Daniel<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-family: Calibri, sans-serif; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">void</span><span class="Apple-converted-space"> </span>vtk2dDataControl::VTKRender() {<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">double</span><span class="Apple-converted-space"> </span>*minmax; <span class="Apple-converted-space"> </span><span style="color: green; ">// min and max within the data<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>nColors = 1000; <span class="Apple-converted-space"> </span><span style="color: green; ">// number of colors<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">double</span><span class="Apple-converted-space"> </span>colorposition[2]; <span class="Apple-converted-space"> </span><span style="color: green; ">// holds the position of the colorbar<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>windowsizeX; <span class="Apple-converted-space"> </span><span style="color: green; ">// X window size - to be supplied externally<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>windowsizeY; <span class="Apple-converted-space"> </span><span style="color: green; ">// Y window size - to be supplied externally<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>imageextent[6]; <span class="Apple-converted-space"> </span><span style="color: green; ">// extent of the imgage<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>barwidth = 120; <span class="Apple-converted-space"> </span><span style="color: green; ">// FIXME, X space for colorbar<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>labelnum; <span class="Apple-converted-space"> </span><span style="color: green; ">// number of labels - a helper var<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>upperborder = 20; <span class="Apple-converted-space"> </span><span style="color: green; ">// border space between upper image edge and window edge<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>rightborder = 40; <span class="Apple-converted-space"> </span><span style="color: green; ">// space between image and colorbar<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">int</span><span class="Apple-converted-space"> </span>i;<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// calculate the effective width of the window, that can be used for the display<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> windowsizeX =<span class="Apple-converted-space"> </span><span style="color: blue; ">this</span>->Width;<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> windowsizeY =<span class="Apple-converted-space"> </span><span style="color: blue; ">this</span>->Height;<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> effectiveSizeX = windowsizeX - imageposition[0] - barwidth - rightborder;<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> effectiveSizeY = windowsizeY - imageposition[1] - upperborder;<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// import the data into the vtkimagedata structure<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkImageImport, import);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> import->SetImportVoidPointer(localdata);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> import->SetDataScalarTypeToDouble();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> import->SetWholeExtent(0,locdimX-1,0,locdimY-1,0,0);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> import->SetDataExtent(0,locdimX-1,0,locdimY-1,0,0);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> import->Update();<span class="Apple-converted-space"> </span><span style="color: green; ">// call update for getting the right minmax values below...<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> minmax = import->GetOutput()->GetScalarRange();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// resample the image in order to fit into the given window geometry<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkImageResample, resample);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> resample->SetInputConnection(import->GetOutputPort());<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> resample->SetDimensionality(2);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> resample->SetAxisMagnificationFactor(0, ((<span style="color: blue; ">double</span>) effectiveSizeX) / locdimX);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> resample->SetAxisMagnificationFactor(1, ((<span style="color: blue; ">double</span>) effectiveSizeY) / locdimY);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// add a colorbar<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkLookupTable, lookupTable);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkScalarBarActor, colorbar);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> lookupTable->SetNumberOfColors(nColors);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> lookupTable->SetTableRange(minmax);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">//lookupTable->SetSaturationRange(0, 1);<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">//lookupTable->SetHueRange(0, 1);<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> lookupTable->SetRampToLinear();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> lookupTable->Build();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// Filter to convert the grey image into an RGB output<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkImageMapToColors, rgb);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> rgb->SetInputConnection(resample->GetOutputPort());<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> rgb->SetLookupTable(lookupTable);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> rgb->SetOutputFormatToRGBA();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> rgb->Update();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// Set up a 2D context view - this is the basic 2D API structure<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">if</span><span class="Apple-converted-space"> </span>(view != NULL) view->Delete();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> view = vtkContextView::New();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> view->GetRenderWindow()->SetSize(windowsizeX, windowsizeY); <o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// register the image into the view and position it<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkImageItem, item); <o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> view->GetScene()->AddItem(item);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> item->SetImage(vtkImageData::SafeDownCast(rgb->GetOutput()));<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> item->GetImage()->GetExtent(imageextent);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> item->SetPosition(imageposition[0], imageposition[1]);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// create a new scene for axes and colorbar; also create actor for axes<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkContextScene, axesscene);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkContextActor, axesactor);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// Starting from here there is mainly stuff for the axes...<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// X Axis<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkAxis, Xaxis);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetBehavior(1);<span class="Apple-converted-space"> </span><span style="color: green; ">// rescalable<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// now define location of axis by giving two points<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span></span><span lang="FR" style="font-size: 10pt; font-family: 'Courier New'; ">Xaxis->SetPoint1(imageposition[0], imageposition[1]);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="FR" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetPoint2((<span style="color: blue; ">int</span>) imageextent[1]-imageextent[0] + imageposition[0], imageposition[1]);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="FR" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; ">Xaxis->SetPosition(vtkAxis::BOTTOM); <span class="Apple-converted-space"> </span><span style="color: green; ">// this is an axis at the bottom<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetTitle(XAxisName->c_str()); <span class="Apple-converted-space"> </span><span style="color: green; ">// title of axis<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->GetPen()->SetWidth(2); <span class="Apple-converted-space"> </span><span style="color: green; ">// lines are 2 pixel wide<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetMinimum(locXmin); <span class="Apple-converted-space"> </span><span style="color: green; ">// set Xmin and ...<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetMaximum(locXmax); <span class="Apple-converted-space"> </span><span style="color: green; ">// ... Xmax for later autoscale()<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetPrecision(2); <span class="Apple-converted-space"> </span><span style="color: green; ">// two figures after period<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetNotation(2); <span class="Apple-converted-space"> </span><span style="color: green; ">// "mixed" (i.e. standard or scientific)<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->AutoScale(); <span class="Apple-converted-space"> </span><span style="color: green; ">// perform autoscale for ticks<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->Update(); <span class="Apple-converted-space"> </span><span style="color: green; ">// do it !<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetMinimum(locXmin); <span class="Apple-converted-space"> </span><span style="color: green; ">// got to reste min/max values afetr autoscale<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetMaximum(locXmax);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->GetGridPen()->SetColor(0,0,0,1);<span class="Apple-converted-space"> </span><span style="color: green; ">// write in black<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetLabelsVisible(<span style="color: blue; ">true</span>); <span class="Apple-converted-space"> </span><span style="color: green; ">// show it all...<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->SetVisible(<span style="color: blue; ">true</span>);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">//Xaxis->GetTitleProperties()->SetLineOffset(10);<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xaxis->Update(); <span class="Apple-converted-space"> </span><span style="color: green; ">// do it !<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> axesscene->AddItem(Xaxis); <span class="Apple-converted-space"> </span><span style="color: green; ">// add to scene<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; color: green; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// Y Axis<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// everything completely analogous to X Axis - so no need for comments here<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkAxis, Yaxis);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->SetBehavior(1);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span></span><span lang="FR" style="font-size: 10pt; font-family: 'Courier New'; ">Yaxis->SetPoint1(imageposition[0], imageposition[1]);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="FR" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->SetPoint2(imageposition[0], (<span style="color: blue; ">int</span>) imageextent[3]-imageextent[2] + imageposition[1]);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="FR" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; ">Yaxis->SetPosition(vtkAxis::LEFT);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->SetTitle(YAxisName->c_str());<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->GetPen()->SetWidth(2);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->SetMinimum(locYmin);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->SetMaximum(locYmax);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->AutoScale();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->Update();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->SetMinimum(locYmin);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->SetMaximum(locYmax);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->GetGridPen()->SetColor(0,0,0,1);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->GetTitleProperties()->SetOrientation(90.0);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->SetLabelsVisible(<span style="color: blue; ">true</span>);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->SetVisible(<span style="color: blue; ">true</span>);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yaxis->Update();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> axesscene->AddItem(Yaxis);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// prepare axes on top and on right w/o labels (just ticks)<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> labelnum = Xaxis->GetTickPositions()->GetDataSize();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkStringArray, Xemptylabels);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xemptylabels->SetNumberOfValues(labelnum);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">for</span><span class="Apple-converted-space"> </span>(i=0; i<labelnum; i++) {<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Xemptylabels->SetValue(i,<span class="Apple-converted-space"> </span><span style="color: maroon; ">""</span>);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> }<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> labelnum = Yaxis->GetTickPositions()->GetDataSize();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkStringArray, Yemptylabels);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yemptylabels->SetNumberOfValues(labelnum);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: blue; ">for</span><span class="Apple-converted-space"> </span>(i=0; i<labelnum; i++) {<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> Yemptylabels->SetValue(i,<span class="Apple-converted-space"> </span><span style="color: maroon; ">""</span>);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> }<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// create axis on top of image<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkAxis, XaxisUpper);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->SetBehavior(1);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span></span><span lang="FR" style="font-size: 10pt; font-family: 'Courier New'; ">XaxisUpper->SetPoint1(imageposition[0], imageposition[1] + (<span style="color: blue; ">int</span>) (imageextent[3]-imageextent[2]));<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="FR" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->SetPoint2((<span style="color: blue; ">int</span>) imageextent[1]-imageextent[0] + imageposition[0], imageposition[1] + (<span style="color: blue; ">int</span>) (imageextent[3]-imageextent[2]));<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="FR" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; ">XaxisUpper->SetPosition(vtkAxis::TOP);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->GetPen()->SetWidth(2);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->SetMinimum(locXmin);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->SetMaximum(locXmax);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// want to have same number of ticks as X axis ...<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->SetNumberOfTicks(Xaxis->GetTickPositions()->GetDataSize());<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->GetGridPen()->SetColor(0,0,0,1);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// ... and same positions of ticks as X axis ...<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->SetTickPositions(Xaxis->GetTickPositions());<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// .. but no labels this time.<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->SetTickLabels(Xemptylabels);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->SetVisible(<span style="color: blue; ">true</span>);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> XaxisUpper->Update();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> axesscene->AddItem(XaxisUpper);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// create axis on the right of top image - analogous to XaxisUpper above<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkAxis, YaxisRight);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->SetBehavior(1);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->SetPoint1(imageposition[0] + (<span style="color: blue; ">int</span>) imageextent[1]-imageextent[0], imageposition[1]);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->SetPoint2(imageposition[0] + (<span style="color: blue; ">int</span>) imageextent[1]-imageextent[0], (<span style="color: blue; ">int</span>) imageextent[3]-imageextent[2] + imageposition[1]);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->SetPosition(vtkAxis::RIGHT);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->GetPen()->SetWidth(2);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->SetMinimum(locYmin);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->SetMaximum(locYmax);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->SetNumberOfTicks(Yaxis->GetTickPositions()->GetDataSize());<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->GetGridPen()->SetColor(0,0,0,1);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->SetTickPositions(Yaxis->GetTickPositions());<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: 'Courier New'; ">YaxisRight->SetTickLabels(Yemptylabels);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; ">YaxisRight->SetVisible(<span style="color: blue; ">true</span>);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> YaxisRight->Update();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> axesscene->AddItem(YaxisRight);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// now format and position colorbar<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorbar->SetLookupTable(lookupTable);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorposition[0] = 1.0 - (1.0* barwidth)/windowsizeX;<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorposition[1] = (1.0* imageposition[1])/windowsizeY;<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorbar->SetWidth(0.5);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorbar->SetHeight(1.0 - 2* colorposition[1]);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorbar->SetPosition(colorposition);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorbar->SetLabelFormat(<span style="color: maroon; ">"%1.2E"</span>);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorbar->PickableOff();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorbar->SetMaximumWidthInPixels(barwidth);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorbar->VisibilityOn();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorbar->GetLabelTextProperty()->SetShadow(0);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> colorbar->GetLabelTextProperty()->SetColor(0,0,0);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// register the axescene to the axesactor, which and point to the renderer<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> axesactor->SetScene(axesscene);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> view->GetRenderer()->AddActor(axesactor);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// register the colorbar as an actor<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> view->GetRenderer()->AddActor(colorbar);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> RenderWindow = view->GetRenderWindow();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> RenderWindow->SetWindowId((HWND)Handle.ToInt64());<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "><o:p> </o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span><span style="color: green; ">// set Interactor Style to RubberBand<o:p></o:p></span></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkInteractorStyleRubberBand2D, RubberBandStyle);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> RubberBandStyle->SetRenderOnMouseMove(<span style="color: blue; ">false</span>);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> VTK_CREATE(vtkCallbackCommand, SelectionChangedCallback);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> SelectionChangedCallback->SetCallback(SelectionChangedCallbackFunction);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> RubberBandStyle->AddObserver(vtkCommand::SelectionChangedEvent,SelectionChangedCallback);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> RenderWindow->SetInteractor(WinInteractor);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> RenderWindow->SetDoubleBuffer(1);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> WinInteractor->SetInteractorStyle(RubberBandStyle);<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> WinInteractor->Initialize();<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: 'Courier New'; "> <span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: 'Courier New'; ">}</span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div><div style="border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-top-style: solid; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding-top: 3pt; padding-right: 0cm; padding-bottom: 0cm; padding-left: 0cm; "><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">Von:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "><span class="Apple-converted-space"> </span>Eric E. Monson [mailto:emonson@cs.duke.edu]<span class="Apple-converted-space"> </span><br><b>Gesendet:</b><span class="Apple-converted-space"> </span>Dienstag, 7. Dezember 2010 16:13<br><b>An:</b><span class="Apple-converted-space"> </span>Frese Daniel Dr.<br><b>Cc:</b><span class="Apple-converted-space"> </span>Marcus D. Hanwell;<span class="Apple-converted-space"> </span><a href="mailto:vtkusers@vtk.org" style="color: blue; text-decoration: underline; ">vtkusers@vtk.org</a><br><b>Betreff:</b><span class="Apple-converted-space"> </span>Re: AW: [vtkusers] Positioning titles within vtkAxis<o:p></o:p></span></div></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">Hey Daniel,<o:p></o:p></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">Yes, this shouldn't be happening. Would you be able to send the section of your code that generates this chart? I'm curious how you're implementing the combination of ImageItem and axes. Maybe there is another way of accomplishing the same thing that wouldn't cause the overlap, or it might at least help us diagnose why the label placement routine isn't dealing with your case correctly.<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">Also, just to be clear, was this generated with the current development (git) version, or with 5.6.1?<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">Thanks,<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">-Eric<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">On Dec 7, 2010, at 8:29 AM, Frese Daniel Dr. wrote:<o:p></o:p></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><br><br><o:p></o:p></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Hello Eric, Marcus,</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">before I explain my problem once more I just want to add that I find the charts functionality already quite useful.</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">As I said I just updated my vtk stuff and I can imagine it must have been quite some work to get to this point.</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I appended a screenshot illustrating the problem. Since I don’t know how this appears on the mail list I just describe briefly.</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">I have a scene with a vtkImageItem to show some 2D matrix data. Around the image I have axes (vtkAxis objects) with</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">appropriate ticks, tick labels and axes titles. The problem is that the axes titles overlap with the tick labels. E.g. for the</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">case of the X axis , the title should be lower such that it does not touch the labels, but there does not seem to</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">be a way to do that as of now.</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">A possible low level solution would be a way to specify some vertical (horizontal axis case) or some horizontal (vertical axis case) offset</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">for the position of the titles (in pixel or font size units).</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">In principle of course the vtkAxis object could calculate such an offset by itself, since it has access to both</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">the labels’ and the titles’ text properties.</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">What do you think ?</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Daniel</span><o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> </span><o:p></o:p></div></div><div><div style="border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-top-style: solid; padding-top: 3pt; padding-right: 0cm; padding-bottom: 0cm; padding-left: 0cm; border-width: initial; border-color: initial; "><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">Von:</span></b><span class="apple-converted-space"><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "> </span></span><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">Eric E. Monson [mailto:emonson@cs.duke.edu]<span class="apple-converted-space"> </span><br><b>Gesendet:</b><span class="apple-converted-space"> </span>Dienstag, 7. Dezember 2010 13:54<br><b>An:</b><span class="apple-converted-space"> </span>Frese Daniel Dr.<br><b>Cc:</b><span class="apple-converted-space"> </span><a href="mailto:vtkusers@vtk.org" style="color: blue; text-decoration: underline; ">vtkusers@vtk.org</a><br><b>Betreff:</b><span class="apple-converted-space"> </span>Re: [vtkusers] Positioning titles within vtkAxis</span><o:p></o:p></div></div></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "> <o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">Hey Daniel,<o:p></o:p></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "> <o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">It does seem like SetLineOffset should do something like what you want, but I think they way the label text is applied with VerticalJustification probably nullifies any line offset setting. Line spacing shouldn't matter for a single line of text.<o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "> <o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">So, the adjustments you want are just not implemented. Marcus, the developer, has worked hard to get the labels right, though, so if you have a use case where the labels are running into the axis ticks maybe you should describe the situation and send a screen shot – it may be something that needs fixing. <o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "> <o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">You're right that the charts are still under development, but some of the core functionality has settled down, and as you said, the current implementation is better than the 5.6.1 version.<o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "> <o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">-Eric<o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "> <o:p></o:p></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span class="apple-style-span"><span style="font-size: 13.5pt; font-family: Helvetica, sans-serif; color: black; ">------------------------------------------------------</span></span><span style="font-size: 13.5pt; font-family: Helvetica, sans-serif; color: black; "><br><span class="apple-style-span">Eric E Monson</span><br><span class="apple-style-span">Duke Visualization Technology Group</span><br><br><br></span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "> <o:p></o:p></div></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "> <o:p></o:p></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; ">On Dec 7, 2010, at 3:35 AM, Frese Daniel Dr. wrote:<o:p></o:p></div></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><br><br><br><o:p></o:p></div></div><div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">Hi all,</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; "> </span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">I have a problem positioning an axis title relative to its vtkAxis object.</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">Basically, if I draw a horizontal X-axis, the assigned title is written such that it overlapps with the</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">tick labels. Reading through the docs, I got the impression that I should be able to introduce a</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">vertical offset between the drawn axis and the titel by using either a call to</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; text-indent: 35pt; "><span style="font-size: 10pt; font-family: 'Courier New'; color: green; ">Xaxis->GetTitleProperties()->SetLineOffset(offset_in_pixel)</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">or by </span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; text-indent: 35pt; "><span style="font-size: 10pt; font-family: 'Courier New'; color: green; ">Xaxis->GetTitleProperties()->SetLineSpacing(scale_factor).</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">But neither call seems to have any effect.</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">Moving from 5.6.1 to the latest vtk git source tree I noticed that the chart stuff seems to have</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">improved greatly (most functions a joy to use !), but it still seems to be a work in progress.</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">So am doing something stupid and do I miss something here or is this feature just not</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">implemented yet ?</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; "> </span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; ">Daniel</span><o:p></o:p></div></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-bottom: 0.0001pt; margin-left: 0cm; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 10pt; font-family: Calibri, sans-serif; "> </span><o:p></o:p></div></div></div></div></div></div></div></div></div></div></PRE><p><br>------------------------------------------------------------------------------------------------------ <br><br>Registergericht: Traunstein / Registry Court: HRB 275 - Sitz / Head Office: Traunreut <br><br>Aufsichtsratsvorsitzender / Chairman of Supervisory Board: Rainer Burkhard <br><br>Geschäftsführung / Management Board: Thomas Sesselmann (Vorsitzender / Chairman),<br><br>Michael Grimm, Matthias Fauser, Sebastian Tondorf<br><br><br><a href="<a href="http://www.heidenhain.de/disclaimer" style="color: blue; text-decoration: underline; ">http://www.heidenhain.de/disclaimer</a>" target="_blank">E-Mail Haftungsausschluss / E-Mail Disclaimer</a><br><pre><br></div></blockquote></div><br></div></body></html>