Hi,<br><br>I've got a watershed filtered image processed by a colormapper. So it's an image of type:<br><br> typedef itk::RGBPixel<short> RGBPixelType;<br> typedef itk::Image<RGBPixelType, 2> RGBImageType;<br>
<br>Now I want to filter that image with a connected threshold filter, because I need it this way.<br>But ConnectedThresholdImageFilter can't process such RGB images. <br>I tryed to convert the image into a short type by using CastImageFilter, too.<br>
But I always get:<br><br> error C2440: 'static_cast' : cannot convert from 'itk::RGBPixel<TComponent>' to 'short'<br><br>So how can I cast from RGB to short? Or how to filter a RGB image with a connected threshold filter?<br>
<br><br>Michael<br><br>