<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="&#1;" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Hi Shaadi,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>vtkPicker will pick 3D world coordinates which may not have a z
value of 0.  You will want to use a picker which will return you points
confined to your image plane.  You could try using </span><span
style='font-size:9.0pt;font-family:"Arial","sans-serif"'><a
href="http://www.vtk.org/doc/nightly/html/classvtkCellPicker.html">vtkCellPicker</a>
or <a href="http://www.vtk.org/doc/nightly/html/classvtkPropPicker.html">vtkPropPicker</a>.<span
style='color:#1F497D'><o:p></o:p></span></span></p>

<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>All the best,<o:p></o:p></span></p>

<div>

<p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>Sarah Macumber<o:p></o:p></span></p>

</div>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
vtkusers-bounces@vtk.org [mailto:vtkusers-bounces@vtk.org] <b>On Behalf Of </b>Shady
Shidfar<br>
<b>Sent:</b> Thursday, September 25, 2008 4:48 AM<br>
<b>To:</b> VTKUsers<br>
<b>Subject:</b> [vtkusers] problem with vtkPicker(vtkCellPicker,
vtkPointPicker)<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<div>

<div>

<div>

<div>

<p class=MsoNormal><span style='color:black'>Hi Everyone,</span><o:p></o:p></p>

<p class=MsoNormal><span style='color:black'>I sent this yesterday but I don't
know why it didn't apear in the forum. I'm sending it again, please can someone
help me with it.</span><o:p></o:p></p>

<p class=MsoNormal><span style='color:black'>I'm using vtkPicker to pick cells
on an image and draw on the image. I've copied a short version of my program.
I'm using vtkDotNet and managedItk. I want to draw lines through the picked
points on a 2d tif image. Key 'p' is used to pick a point. The lines need to
remain in the same place they've been drawn no matter zooming or rotating. The
problem is&nbsp;:</span><o:p></o:p></p>

<p class=MsoNormal><span style='color:black'>1-&nbsp;When I zoom the image and
get the picked cell dimension, Z would be a value rather than 0 which I don't
understand why.</span><o:p></o:p></p>

<p class=MsoNormal><span style='color:black'>2- When I rotate the image and
pick the points and draw lines. It seems they are in the right place but when I
rotate the image the lines would be somewhere outside the image. </span><o:p></o:p></p>

<p class=MsoNormal><span style='color:black'>&nbsp;</span><o:p></o:p></p>

<p class=MsoNormal><span style='color:black'>I'm using picker.GetPickPosition()
to get the dimension of the picked point. I'd probably need to change this.
Does anyone know how I can fix the problem? Any suggestions would be a great
help</span><o:p></o:p></p>

<p class=MsoNormal><span style='color:black'>&nbsp;</span><o:p></o:p></p>

<p class=MsoNormal><span style='color:black'>Thanks</span><o:p></o:p></p>

<p class=MsoNormal><span style='color:black'>Shaadi</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> System;<o:p></o:p></span></p>

</div>

<div>

<p><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> System.Collections.Generic;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> System.ComponentModel;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> System.Data;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> System.Drawing;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> System.Linq;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> System.Text;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> System.Windows.Forms;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> System.Collections;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> vtk;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>using</span><span
style='font-size:10.0pt'> itk;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>namespace</span><span
style='font-size:10.0pt'> InteractiveHierarchicalSegmentationDotNet.Test<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>public</span><span
style='font-size:10.0pt'> <span style='color:blue'>partial</span> <span
style='color:blue'>class</span> <span style='color:#2B91AF'>testPicking</span>
: <span style='color:#2B91AF'>Form<o:p></o:p></span></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>vtkCellPicker</span><span
style='font-size:10.0pt'> picker;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>vtkRenderer</span><span
style='font-size:10.0pt'> renderer = <span style='color:blue'>new</span> <span
style='color:#2B91AF'>vtkRenderer</span>();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>public</span><span
style='font-size:10.0pt'> testPicking()<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>InitializeComponent();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>vtkFormsWindowControl1.GetRenderWindow().AddRenderer(renderer);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>viewImage();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>picker = <span style='color:blue'>new</span> <span
style='color:#2B91AF'>vtkCellPicker</span>();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>picker.PickFromListOn(); <span
style='color:green'>// to make sure picker won't pick props instead of cells<o:p></o:p></span></span></p>

<p><span style='font-size:10.0pt'>picker.AddObserver((<span style='color:blue'>uint</span>)vtk.<span
style='color:#2B91AF'>EventIds</span>.EndPickEvent, <span style='color:blue'>new</span>
vtk.<span style='color:#2B91AF'>vtkDotNetCallback</span>(annotatePick));<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>vtkFormsWindowControl1.GetInteractor().SetPicker(picker);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>private</span><span
style='font-size:10.0pt'> <span style='color:blue'>void</span>
annotatePick(vtk.<span style='color:#2B91AF'>vtkObject</span> caller, <span
style='color:blue'>uint</span> eventId,<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>object</span><span
style='font-size:10.0pt'> clientData, <span style='color:#2B91AF'>IntPtr</span>
callData)<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>vtkActor2D</span><span
style='font-size:10.0pt'> textActor = <span style='color:blue'>new</span> <span
style='color:#2B91AF'>vtkActor2D</span>();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'>[] selPt = picker.GetSelectionPoint();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'> x = selPt[0];<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'> y = selPt[1];<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'>[] pickPos = picker.GetPickPosition();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'> xp = pickPos[0];<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'> yp = pickPos[1];<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'> zp = pickPos[2];<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>pointsDataGridView.Rows.Add();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>pointsDataGridView.Rows[pointsDataGridView.RowCount
- 1].Cells[0].Value = xp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>pointsDataGridView.Rows[pointsDataGridView.RowCount
- 1].Cells[1].Value = yp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>pointsDataGridView.Rows[pointsDataGridView.RowCount
- 1].Cells[2].Value = zp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'>[] newPoint = <span style='color:blue'>new</span> <span
style='color:blue'>double</span>[] { xp, yp, zp };<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'>[] previousPoint = <span style='color:blue'>new</span>
<span style='color:blue'>double</span>[3];<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>if</span><span style='font-size:
10.0pt'> (pointsDataGridView.Rows.Count == 1)<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>previousPoint = newPoint;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>else<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:green'>// retrieve the previous row<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'> pxp = <span style='color:#2B91AF'>Convert</span>.ToDouble(pointsDataGridView.Rows[pointsDataGridView.Rows.Count
- 2].Cells[0].Value);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'> pyp = <span style='color:#2B91AF'>Convert</span>.ToDouble(pointsDataGridView.Rows[pointsDataGridView.Rows.Count
- 2].Cells[1].Value);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>double</span><span
style='font-size:10.0pt'> pzp = <span style='color:#2B91AF'>Convert</span>.ToDouble(pointsDataGridView.Rows[pointsDataGridView.Rows.Count
- 2].Cells[2].Value);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>previousPoint[0] = pxp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>previousPoint[1] = pyp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>previousPoint[2] = pzp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>int</span><span style='font-size:
10.0pt'> r = 1, g = 0, b = 0;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>createLine(previousPoint, newPoint);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>vtkFormsWindowControl1.Refresh();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>private</span><span
style='font-size:10.0pt'> <span style='color:blue'>void</span> createLine(<span
style='color:blue'>double</span>[] startPoint, <span style='color:blue'>double</span>[]
endPoint)<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>vtkPoints</span><span
style='font-size:10.0pt'> VTKpoints = <span style='color:blue'>new</span> <span
style='color:#2B91AF'>vtkPoints</span>();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>VTKpoints.SetNumberOfPoints(2);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>VTKpoints.InsertPoint(0, startPoint[0],
startPoint[1], startPoint[2]);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>VTKpoints.InsertPoint(1, endPoint[0],
endPoint[1], endPoint[2]);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>&nbsp;<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>vtkLine</span><span
style='font-size:10.0pt'> line = <span style='color:blue'>new</span> <span
style='color:#2B91AF'>vtkLine</span>();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>line.GetPointIds().SetId(0, 0);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>line.GetPointIds().SetId(1, 1);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>vtkUnstructuredGrid</span><span
style='font-size:10.0pt'> grid = <span style='color:blue'>new</span> <span
style='color:#2B91AF'>vtkUnstructuredGrid</span>();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>grid.Allocate(1, 1);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>grid.InsertNextCell(line.GetCellType(),
line.GetPointIds());<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>grid.SetPoints(VTKpoints);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>vtkDataSetMapper</span><span
style='font-size:10.0pt'> aLineMapper = <span style='color:blue'>new</span> <span
style='color:#2B91AF'>vtkDataSetMapper</span>();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>aLineMapper.SetInput(grid);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>vtkActor</span><span
style='font-size:10.0pt'> aLineActor = <span style='color:blue'>new</span> <span
style='color:#2B91AF'>vtkActor</span>();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>aLineActor.SetMapper(aLineMapper);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>aLineActor.AddPosition(0, 0, 0);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>aLineActor.GetProperty().SetDiffuseColor(1,
0, 0);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>renderer.AddActor(aLineActor);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>vtkFormsWindowControl1.GetRenderWindow().AddRenderer(renderer);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>private</span><span
style='font-size:10.0pt'> <span style='color:blue'>void</span> viewImage()<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>try<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>itkImage_UC3</span><span
style='font-size:10.0pt'> input = <span style='color:#2B91AF'>itkImage_UC3</span>.New();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>input.Read(<span style='color:#A31515'>&quot;C:/brain.tif&quot;</span>);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:green'>// Import ITK image to VTK<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>itkImageToVTKImageFilter_IUC3</span><span
style='font-size:10.0pt'> itk2vtk =<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>itkImageToVTKImageFilter_IUC3</span><span
style='font-size:10.0pt'>.New();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>itk2vtk.SetInput(input);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>itk2vtk.Update();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>vtkImageData</span><span
style='font-size:10.0pt'> data = itk2vtk.GetOutput();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>vtkImageFlip</span><span
style='font-size:10.0pt'> imageFlip = <span style='color:blue'>new</span> <span
style='color:#2B91AF'>vtkImageFlip</span>();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>imageFlip.SetFilteredAxis(1);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>imageFlip.SetInput(data);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>vtk.<span style='color:#2B91AF'>vtkImageActor</span>
imageActor = <span style='color:blue'>new</span> <span style='color:#2B91AF'>vtkImageActor</span>();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>imageActor.SetInput(imageFlip.GetOutput());<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>renderer.AddActor(imageActor);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>vtkFormsWindowControl1.Update();<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:blue'>catch</span><span
style='font-size:10.0pt'> (<span style='color:#2B91AF'>Exception</span> ex)<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>{<o:p></o:p></span></p>

<p><span style='font-size:10.0pt;color:#2B91AF'>Console</span><span
style='font-size:10.0pt'>.WriteLine(ex);<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

<p><span style='font-size:10.0pt'>}<o:p></o:p></span></p>

</div>

</div>

</div>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>