<div>On Wed, Dec 15, 2010 at 4:59 PM, Xi Liang <span dir="ltr"><<a href="mailto:xliang.cad@gmail.com">xliang.cad@gmail.com</a>></span> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Dear all,<br>
<br>
I am trying to run a classification on a vector image of the following<br>
format based on the example from ITK. However, the error message shows No<br>
conversion available from 5 components to: 5 components. I assume this "5<br>
components means the size of the vector which is 5 in my case. Therefore I<br>
guess this algorithm does not support MeasurementVector size of 5?<br>
<br>
typedef unsigned short VectorPixelType;<br>
const unsigned int VectorDimension = 5;<br>
const unsigned int ImageDimension = 3;<br>
<br>
typedef itk::Vector<VectorPixelType , VectorDimension><br>
MeasurementVectorType;<br>
typedef itk::Image< MeasurementVectorType, ImageDimension> ArrayImageType;<br>
<br>
I give a snapshot on the error message and attach it with the email,<br>
together with the source code.<br>
<a href="http://old.nabble.com/file/p30468352/error.png" target="_blank">http://old.nabble.com/file/p30468352/error.png</a><br>
<a href="http://old.nabble.com/file/p30468352/KdTreeBasedKMeansClustering.cxx" target="_blank">http://old.nabble.com/file/p30468352/KdTreeBasedKMeansClustering.cxx</a><br>
KdTreeBasedKMeansClustering.cxx<br>
<a href="http://old.nabble.com/file/p30468352/CMakeLists.txt" target="_blank">http://old.nabble.com/file/p30468352/CMakeLists.txt</a> CMakeLists.txt<br><br></blockquote><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>
<br></div><div>I've seen an error like "No conversion available from 5 components to: 5 components." when accidentally trying to pass a itk::Vector<float,5> as a itk::Vector<unsigned char,5>. The error should definitely say something about the type (5 to 5 doesn't sound like anything is wrong). I'm not sure where this is happening for you though.</div>
<div><br></div><div>David </div></div>