[Insight-users] Can KdThreeBasedKmeansEstimator handle vector of size 5

David Doria daviddoria at gmail.com
Wed Dec 15 19:01:08 EST 2010


On Wed, Dec 15, 2010 at 4:59 PM, Xi Liang <xliang.cad at gmail.com> wrote:

>
> Dear all,
>
> I am trying to run a classification on a vector image of the following
> format based on the example from ITK. However, the error message shows No
> conversion available from 5 components to: 5 components. I assume this "5
> components means the size of the vector which is 5 in my case. Therefore I
> guess this algorithm does not support MeasurementVector size of 5?
>
>        typedef unsigned short  VectorPixelType;
>        const unsigned int VectorDimension = 5;
>        const unsigned int ImageDimension = 3;
>
>        typedef itk::Vector<VectorPixelType ,  VectorDimension>
> MeasurementVectorType;
>        typedef itk::Image< MeasurementVectorType, ImageDimension>
> ArrayImageType;
>
> I give a snapshot on the error message and attach it with the email,
> together with the source code.
> http://old.nabble.com/file/p30468352/error.png
> http://old.nabble.com/file/p30468352/KdTreeBasedKMeansClustering.cxx
> KdTreeBasedKMeansClustering.cxx
> http://old.nabble.com/file/p30468352/CMakeLists.txt CMakeLists.txt
>
>
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.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101215/79720756/attachment.htm>


More information about the Insight-users mailing list