[Insight-developers] [ITK 0010205]: Recent changes to itkBayesianClassifierImageFilter.txx cause WrapITK failures

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Sun Jan 31 09:46:00 EST 2010


Le 31 janv. 10 à 03:27, Luis Ibanez a écrit :

> Hi Hans,
>
> Yes, I would expect that the four template parameters
> are independent of each other.
>
> template <
>
>     class TInputVectorImage,
>     class TLabelsType=unsigned char,
>     class TPosteriorsPrecisionType=double
>     class TPriorsPrecisionType=double
>
>> BayesianClassifierImageFilter
>
>
> I'm not sure that you actually want to wrap all
> permutation, but... regardless... the code should
> compile with different combinations of these
> template parameters.

Luis, Hans,

Thanks a lot for looking at that problem.

Currently, the following type is wrapped with the default settings:

    itk::BayesianClassifierImageFilter< itk::VectorImage< float,2 >,  
unsigned short, float >

and the same in 3D.
Before the recent changes, the following types where wrapped by  
wrapitk by default

    itk::BayesianClassifierImageFilter< itk::VectorImage< unsigned  
short,2 >, unsigned short, float >
    itk::BayesianClassifierImageFilter< itk::VectorImage< float,2 >,  
unsigned short, float >

and the same in 3D.

I think we should rollback to the previous wrapped types.
Is it ok for you?

Thanks,

Gaëtan


>
>
>
>    Luis
>
>
> --------------------------------------------------------------------
> On Sat, Jan 30, 2010 at 6:05 PM, Hans Johnson <hans- 
> johnson at uiowa.edu> wrote:
>> Luis,
>>
>> Are all 4 template parameters completely independent of each  
>> other?  If so,
>> then I'll go in and revert the wrapping to do all permutations again.
>>
>> Hans
>>
>>
>> On 1/30/10 3:30 PM, "Luis Ibanez" <luis.ibanez at kitware.com> wrote:
>>
>>> Hi Hans,
>>
>> Thanks a lot for pointing this out and for
>> adding the test case that
>>> illustrated the problem.
>>
>>
>>> http://public.kitware.com/Bug/view.php?id=10205
>>
>> A fix has now been
>>> committed.
>>
>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Algorithms/itkB
>>> ayesianClassifierImageFilter.txx? 
>>> root=Insight&r1=1.11&r2=1.12&sortby=date[^]
>>
>>>
>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Algorithms/itkBayesianClas
>>> sifierImageFilter.h?root=Insight&r1=1.16&r2=1.17&sortby=date
>> [^]
>>
>>
>> The
>>> SetPriors() method was calling
>>
>>               this->SetInput( 1, priors
>>> )
>>
>> but the SetInput() method is defined in the superclass
>> (the
>>> ImageToImageFilter) as a method that takes an
>> InputImageType * as
>>> argument.
>>
>> That was creating an incorrect entanglement between
>> the type of the
>>> Priors and the type of the input image.
>>
>>
>> That call has now been replaced
>>> with
>>
>>   ProcessObject::SetNthInput( 1, priors)
>>
>> which expects a DataObject *
>>> as argument.
>>
>>
>> ---
>>
>> BTW: This should also solve one of few
>> remaining build
>>> issues in the Dashboard,
>> that was illustrated in a wrapping build
>> in
>>> dash16.
>>
>> http://www.cdash.org/CDash/viewBuildError.php?buildid=526705
>>
>>
>>
>>> Thanks
>>
>>
>>           Luis
>>
>>
>>
>> ---------- Forwarded message ----------
>> From:
>>> Mantis Bug Tracker <mantis at public.kitware.com>
>> Date: Fri, Jan 29, 2010 at 4:42
>>> PM
>> Subject: [ITK 0010205]: Recent changes
>>> to
>> itkBayesianClassifierImageFilter.txx cause WrapITK failures
>> To:
>>> luis.ibanez at kitware.com
>>
>>
>>
>> The following issue has been
>>> ASSIGNED.
>> ====================================================================
>>> ==
>> http://public.kitware.com/Bug/view.php?id=10205
>> ===========================
>>> ===========================================
>> Reported By:
>>>  hans-johnson
>> Assigned To:
>>>  karthik
>> =====================================================================
>>> =
>> Project:                    ITK
>> Issue ID:
>>> 10205
>> Category:
>> Reproducibility:            always
>> Severity:
>>> major
>> Priority:                   high
>> Status:
>>> assigned
>> =====================================================================
>>> =
>> Date Submitted:             2010-01-29 16:42 EST
>> Last Modified:
>>>  2010-01-29 16:42
>>> EST
>> = 
>> =====================================================================
>> Sum
>>> mary:                    Recent changes
>>> to
>> itkBayesianClassifierImageFilter.txx cause WrapITK
>>> failures
>> Description:
>> Karthik,
>>
>> Your recent changes to
>>> itkBayesianClassifierImageFilter.h have exposed a
>> template dependancy that was
>>> causing compile time failures when using
>> WrapIT
>> K.  I've posted the compiler
>>> errors below, and committed code in the
>> testing directory that can be used to
>>> force the compile time error.
>>
>> It looks like a type mis-match when floating
>>> point types are used.
>>
>> I can make this fail in the
>>> itkBayesianClassifierImageFilterTest.cxx
>>
>> #if 1
>>    {
>>    const unsigned int
>>> TestDimension = 2;
>>    typedef unsigned char  TestLabelType;
>>    typedef float
>>>        TestPosteriorType;
>>
>>    //This is a failing test case!!!
>>    typedef
>>> float          TestPriorType;·
>>    typedef itk::VectorImage< double
>>> ,TestDimension >
>> TestInitialLabelImageType; //The element type MUST be the
>>> PriorType
>>
>>    typedef itk::BayesianClassifierImageFilter<
>>
>>>  TestInitialLabelImageType, TestLabelType, TestPosteriorType,
>> TestPriorType >
>>>   TestClassifierFilterType;
>>
>>>  TestClassifierFilterType::Pointer
>> test=TestClassifierFilterType::New();
>>
>>>  }
>> #endif
>>
>>
>> Hans
>>
>> ============================================================
>>> ==========
>>
>> Issue History
>> Date Modified    Username       Field
>>>
>>>  Change
>> = 
>> =====================================================================
>>>
>> 2010-01-29 16:42 hans-johnson   New Issue
>> 2010-01-29 16:42 hans-johnson
>>> Status                   new => assigned
>> 2010-01-29 16:42 hans-johnson
>>> Assigned To               =>
>>>
>> karthik
>> = 
>> = 
>> ====================================================================>
>>
>>
>>
> _______________________________________________
> 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://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-developers

-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100131/f73c43e4/attachment.pgp>


More information about the Insight-developers mailing list