[ITK-users] [ITK] Bug in CenteredTransformInitializer for RGB solved?

Bradley Lowekamp blowekamp at mail.nih.gov
Tue Jun 24 07:41:07 EDT 2014


Hello,

The ImageMoments calculator only works with scalar images not RGB. This would be not so much as a bug, but more mathematically not defined.

You can select a single channel if your image with the VectorIndexSelectionCastImageFilter[1], or convert it to Luminance[2][3], or event perform a segmentation and compute the moments on a binary images.

Brad

[1] http://www.itk.org/Doxygen/html/classitk_1_1VectorIndexSelectionCastImageFilter.html
[2] http://www.itk.org/Doxygen/html/classitk_1_1RGBToLuminanceImageFilter.html
[3] http://www.itk.org/Doxygen/html/classitk_1_1RGBToLuminanceImageAdaptor.html



On Jun 23, 2014, at 11:14 AM, Dr. Roman Grothausmann <grothausmann.roman at mh-hannover.de> wrote:

> Dear mailing list members,
> 
> 
> Basically I want to rigit 3D transform an RGB image for which I use the CenteredTransformInitializer with GeometryOn(). However gcc complains:
> 
> /opt/itk-4.5.1/include/ITK-4.5/itkImageMomentsCalculator.hxx:115:29: error: cannot convert ?const PixelType {aka const itk::RGBPixel<double>}? to ?double? in initialization
> 
> It seems this was reported in 2005 and judged to be a bug:
> http://www.itk.org/pipermail/insight-users/2005-April/012663.html
> 
> Has this been solved and I'm doing something wrong?
> I'd expect that when using GeometryOn() the moments should not matter at all.
> 
> Any help or hints are very much appreciated
> Roman
> 
> 
> 
> -- 
> Dr. Roman Grothausmann
> 
> Tomographie und Digitale Bildverarbeitung
> Tomography and Digital Image Analysis
> 
> Institut für Funktionelle und Angewandte Anatomie, OE 4120
> Medizinische Hochschule Hannover
> Carl-Neuberg-Str. 1
> D-30625 Hannover
> 
> Tel. +49 511 532-9574
> _____________________________________
> 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.php
> 
> 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://public.kitware.com/mailman/listinfo/insight-users
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community



More information about the Insight-users mailing list