<div dir="ltr">Hi<div><br></div><div>Working through the KMeansClustering C++ example, it is difficult to convert the code from C++ to Java.</div><div><br></div><div>Another problem I found is the line:</div><div><br></div>
<div><pre class="" style="padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;font-size:10.399999618530273px;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top">vtkVariant v <span class="" style="color:rgb(0,0,128)">=</span> kMeansStatistics<span class="" style="color:rgb(0,0,64)">-</span><span class="" style="color:rgb(0,0,128)">></span>GetOutput<span class="" style="color:rgb(0,128,0)">(</span><span class="" style="color:rgb(0,128,0)">)</span><span class="" style="color:rgb(0,0,64)">-</span><span class="" style="color:rgb(0,0,128)">></span>GetValue<span class="" style="color:rgb(0,128,0)">(</span>r,kMeansStatistics<span class="" style="color:rgb(0,0,64)">-</span><span class="" style="color:rgb(0,0,128)">></span>GetOutput<span class="" style="color:rgb(0,128,0)">(</span><span class="" style="color:rgb(0,128,0)">)</span><span class="" style="color:rgb(0,0,64)">-</span><span class="" style="color:rgb(0,0,128)">></span>GetNumberOfColumns<span class="" style="color:rgb(0,128,0)">(</span><span class="" style="color:rgb(0,128,0)">)</span> <span class="" style="color:rgb(0,0,64)">-</span> <span class="" style="color:rgb(0,0,221)">1</span><span class="" style="color:rgb(0,128,0)">)</span><span class="" style="color:rgb(0,128,128)">;</span></pre>
<pre class="" style="padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;font-size:10.399999618530273px;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><span class="" style="color:rgb(0,128,128)"><br>
</span></pre><pre class="" style="padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;font-size:10.399999618530273px;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><span class="" style="color:rgb(0,128,128)"><br>
</span></pre><pre class="" style="padding:0px;border:0px none white;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><font color="#008080" style="font-size:10.399999618530273px;line-height:1.2em">In Java the GetOutput() method returns an object of type </font><font color="#008080" size="1"><span style="line-height:12.46875px">vtkTable, which does not support the GetValue() method?</span></font></pre>
<pre class="" style="padding:0px;border:0px none white;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><font color="#008080" size="1"><span style="line-height:12.46875px"><br></span></font></pre>
<pre class="" style="padding:0px;border:0px none white;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><font color="#008080" size="1"><span style="line-height:12.46875px">It does support the GetRow() method which returns an object of type vtkVariantArray but can't see an easy way to get values out of the variant array.</span></font></pre>
<pre class="" style="padding:0px;border:0px none white;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><font color="#008080" size="1"><span style="line-height:12.46875px"><br></span></font></pre>
<pre class="" style="padding:0px;border:0px none white;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><font color="#008080" size="1"><span style="line-height:12.46875px">I must say that trying to get these simple examples is proving very difficult, and can only imagine how difficult it must be for real life examples.</span></font></pre>
<pre class="" style="padding:0px;border:0px none white;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><font color="#008080" size="1"><span style="line-height:12.46875px"><br></span></font></pre>
<pre class="" style="padding:0px;border:0px none white;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top"><font color="#008080" size="1"><span style="line-height:12.46875px">Thanks.</span></font></pre>
<div><br></div>-- <br>Graham<br><a href="mailto:gmseed@gmail.com" target="_blank">gmseed@gmail.com</a><br>
</div></div>