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

Sara Rolfe smrolfe at u.washington.edu
Thu Dec 16 01:22:43 EST 2010


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.

On Dec 15, 2010, at 4:01 PM, David Doria wrote:

> 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
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users

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


More information about the Insight-users mailing list