<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I just recently saw this same error when reading an image from a file with vector<unsigned char, 5> pixel type using an ImageFileReader filter with a vector<double, 5> pixel type. <div><br><div><div>On Dec 15, 2010, at 4:01 PM, David Doria wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><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><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> _____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.html<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote></div><br></div></body></html>