<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi Andras,</p>
<p style="margin-top:0;margin-bottom:0">Thank you for your reply. I could get the highest and lowest coordinates from what you have suggested.</p>
<p style="margin-top:0;margin-bottom:0">I have another question here.</p>
<p style="margin-top:0;margin-bottom:0">How can I locate the coordinates by giving a coloured point and visualize them?</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">...</p>
<p style="margin-top:0;margin-bottom:0"></p>
<div>
<div>vtkSmartPointer<vtkPolyData> point =</div>
<div>vtkSmartPointer<vtkPolyData>::New();</div>
<div><br>
</div>
<div>vtkSmartPointer<vtkPolyDataReader> reader =</div>
<div>vtkSmartPointer<vtkPolyDataReader>::New();</div>
<div>reader->SetFileName(argv[1]);</div>
<div>reader->Update();</div>
<div><span style="font-size: 12pt;">point = reader->GetOutput();</span></div>
<br>
</div>
<div>double bounds[6];</div>
<div>point->GetBounds(bounds);</div>
<div><br>
</div>
<div>std::cout<span style="white-space:pre"> </span><< "xmin: " << bounds[0] << " "</div>
<div><span style="white-space:pre"></span><< "xmax: " << bounds[1] << std::endl</div>
<div><span style="white-space:pre"></span><< "ymin: " << bounds[2] << " "</div>
<div><span style="white-space:pre"></span><< "ymax: " << bounds[3] << std::endl</div>
<div><span style="white-space:pre"></span><< "zmin: " << bounds[4] << " "</div>
<div><span style="white-space:pre"></span><< "zmax: " << bounds[5] << std::endl;</div>
<div><br>
</div>
<div>vtkSmartPointer<vtkPolyDataMapper> Mapper = vtkSmartPointer<vtkPolyDataMapper>::New();</div>
<div>Mapper->SetInputConnection(reader->GetOutputPort());</div>
<div>Mapper->ScalarVisibilityOff();</div>
<div>Mapper->Update();</div>
<div><br>
</div>
<div>vtkSmartPointer<vtkActor> Actor = vtkSmartPointer<vtkActor>::New();</div>
<div>Actor->SetMapper(Mapper);</div>
<div>Actor->GetProperty()->SetPointSize(10);</div>
<div>Actor->GetProperty()->SetColor(1, 0, 1);</div>
<br>
<p></p>
Thank you.
<div><br>
</div>
<div>Regards,</div>
<div>Polly<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Andras Lasso <lasso@queensu.ca><br>
<b>Sent:</b> Saturday, April 14, 2018 2:52 AM<br>
<b>To:</b> Polly Pui; vtkusers@vtk.org<br>
<b>Subject:</b> RE: Polydata Get max values</font>
<div> </div>
</div>
<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="x_WordSection1">
<p class="x_MsoNormal">You can use GetBounds method - <a href="https://www.vtk.org/doc/nightly/html/classvtkDataSet.html#a6a25018c1af03c2fc1068ea4a0221281" id="LPlnk144000" previewremoved="true">
https://www.vtk.org/doc/nightly/html/classvtkDataSet.html#a6a25018c1af03c2fc1068ea4a0221281</a></p>
<div id="LPBorder_GT_15238542161300.7170240735098969" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15238542161280.052158443931703546" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15238542161290.29558244793160693" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15238542161290.6534915527454492"></div>
<div id="LPTitle_15238542161290.8893726515189098" style="top: 0px; color: rgb(220, 79, 173); font-weight: 400; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15238542161300.21128058725725052" href="https://www.vtk.org/doc/nightly/html/classvtkDataSet.html#a6a25018c1af03c2fc1068ea4a0221281" target="_blank" style="text-decoration: none;">VTK: vtkDataSet Class Reference</a></div>
<div id="LPMetadata_15238542161300.3913267921936554" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
www.vtk.org</div>
<div id="LPDescription_15238542161300.9851943532601988" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
abstract class to specify dataset behavior . vtkDataSet is an abstract class that specifies an interface for dataset objects. vtkDataSet also provides methods to provide information about the data, such as center, bounding box, and representative length.</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<p class="x_MsoNormal"> </p>
<p class="x_MsoNormal">Andras</p>
<p class="x_MsoNormal"> </p>
<div>
<div style="border:none; border-top:solid #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal"><b>From:</b> vtkusers <vtkusers-bounces@vtk.org> <b>On Behalf Of
</b>Polly Pui<br>
<b>Sent:</b> Friday, April 13, 2018 1:56 PM<br>
<b>To:</b> vtkusers@vtk.org<br>
<b>Subject:</b> [vtkusers] Polydata Get max values</p>
</div>
</div>
<p class="x_MsoNormal"> </p>
<div id="x_divtagdefaultwrapper">
<p><span style="font-size:12.0pt; color:black">Hi,</span></p>
<p><span style="font-size:12.0pt; color:black">Is there anyone can give me a hint on how to find the highest point (max value of z coordinate) or lowest point (min value of z coordinate) in a polydata?</span></p>
<p><span style="font-size:12.0pt; color:black">I want to mark it with a colour circle to visualize as a keypoint.</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">Thank you so much.</span></p>
<p><span style="font-size:12.0pt; color:black"> </span></p>
<p><span style="font-size:12.0pt; color:black">Polly</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>