Hi Walid,

can you try to add before the loop:

 
mytrainingSample->SetMeasurementVectorSize(sampleGenerator->GetValidationListSample()->GetMeasurementVectorSize());

Manuel


Le 23/05/2014 13:45, Walid Bouceffa a écrit :
> Hi Rashad,
>
> After many try,  i figure out what cuz the problem but i  don't know
> how to resolve it !
>
>
> |
> typedefListSampleGeneratorType::ListSampleType::PointermytrainingSample 
> =ListSampleType::New();
>
>
> for(ListSampleType::IteratoritSample
> =sampleGenerator->GetValidationListSample()->Begin();
>                 itSample
> !=sampleGenerator->GetValidationListSample()->End();
>                 ++itSample)
>             mytrainingSample->PushBack(itSample.GetMeasurementVector());
> |
>
>
> this code crash and give this error :
> itk::ERROR: ListSample(0xc22e9c0): MeasurementVectorSize: 0 doesn't
> match input measurement vector length: 4
>
> the issue is that :
>
> mytrainingLabel->GetMeasurementVectorSize() = 0
> itSample.GetMeasurementVector().Size() = 4 !!!!!
>
> i tried to put explicitly  mytrainingLabel MeasurementVectorSize
> before the PushBack like this :
>
> |
>
> mytrainingSample->SetMeasurementVectorSize(sampleGenerator->GetValidationListSample()->GetMeasurementVectorSize());
>
> |
>
> it works for small images sample ~20 Mb, but when i tried with huge
> data  ~1 GB, it crash whit this message : std::bad_alloc
>
> Best,
> Walid
>
> -- 
> -- 
> Check the OTB FAQ at
> http://www.orfeo-toolbox.org/FAQ.html
>  
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/otb-users?hl=en
> ---
> You received this message because you are subscribed to the Google
> Groups "otb-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout.

-- 
Manuel GRIZONNET
CNES - DCT/SI/AP - BPI 1219
18, avenue Edouard Belin
31401 Toulouse Cedex 09 - France
Tel: +33 561 282 630 - Fax: +33 561 283 109

-- 
-- 
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html

You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to