[Insight-users] VectorConfidenceConnectedImageFilter Bug/Fix?

Bradley Lowekamp blowekamp at mail.nih.gov
Fri May 13 12:18:35 EDT 2005


The VectorConfidenceConnectedImageFilter does not work with Vectors, 
only RGBPixel types.

Can anyone confirm or deny that this is a correct way to fix this? And 
if so should it be placed in the CVS? I am willing to up date the 
necessary test. I do not fully understand how filters are suppose to 
work with the different types, and how they indicate what types they 
work with so there may be something I am missing.

Thanks.

On May 6, 2005, at 11:18 AM, Lowekamp, Bradley (NIH/NLM/LHC) wrote:

> Hello all.
>
>
> I can only get VectorConfidenceConnectedImageFilter to work with RGB 
> typed images, the following caused me problems:
>
>
>
> typedef itk::Image < itk::FixedArray<double, 4>, 2> MyImageType;
>
> typedef itk::VectorConfidenceConnectedImageFilter<MyImageType, 
> MaskImageType> ConnectedFilterType;
>
> ConnectedFilterType::Pointer cc = ConnectedFilterType::New();
>
>
> The compiler would complain about these lines in 
> itkVectorCondidenceConnectedImageFilter.txx:
>
>
>
> typedef typename NumericTraints<InputPixelType>::RealType 
> InputRealType;
>
> ...
>
> const unsigned int dimension = InputRealType::Dimension;
>
>
>
> After check around I discovered the "RealType" is not defined for 
> these Fixed array templates, and the it seems like it's not really 
> even needed by the VectorConnectedConfidence class, so deleted the 
> definition of InputRealType, and change the second line:
>
>
>
> const unsigned int dimension = InputPixelType::Dimension;
>
>
> These seemed to fix the problem I was running into, I have not tested 
> this much yet. I could be wrong about this, I was just hacking around 
> to get the fix, I don't know what all this class does internally.
>
>
> The reason that I was trying this was because I am thinking that Hue, 
> might be a better classifier for my data, so I wrote a adaptor to add 
> it, which caused things to break.
>
>
> Thanks,
>
> Brad
>
>
> ========================================================
>
> Bradley Lowekamp
>
> Management Systems Designers Contractor for
>
> Office of High Performance Computing and Communications
>
> National Library of Medicine
>
> 'blowekamp at mail.nih.gov
> <ATT1074990.txt>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2214 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20050513/55563849/attachment.bin


More information about the Insight-users mailing list