[Insight-developers] Review Statistics: WeightedCovarianceSampleFilter
Nicholas Tustison
ntustison at gmail.com
Mon Jul 12 06:34:22 EDT 2010
Thank you very much, Karthik, for taking the time to investigate this issue. I did commit the changes and the 2nd test passed without a hitch on my machine. I'll keep an eye open to see if any unforeseen problems arise due to the changes. Thanks again.
Nick
On Jul 11, 2010, at 11:35 PM, Karthik Krishnan wrote:
> Glancing at the code the WeightedCovarianceCalculator in Numerics/Statistics does handle runtime lengths for the measurement vector length (lines 150, 236, 248), but the class Review/Statistics/WeightedCovarianceSampleFilter.txx (lines 103, 109, 205, 211) do not.
>
> I just added a test called itkWeightedCovarianceSampleFilterTest2.cxx that fails for now, but should pass once you add those couple of initializer lines to propagate the length in.
>
> Thanks
> --
> karthik
>
>
> On Sun, Jul 11, 2010 at 10:45 PM, Nick Tustison <ntustison at wustl.edu> wrote:
> Hi All,
>
> Quick question---I'm using the WeightedCovarianceSampleFilter of the review statistics and ran into a bus error. The problem is that I'm using an itk::Array for the MeasurementVectorType as I don't have the MeasurementVector size until run time and the code assumes a known MeasurementVector size. This is in contrast to the corresponding test which uses a FixedArray type for the MeasurementVectorType which is why the test doesn't fail. If I modify the code to explicitly set the proper length, i.e.
>
> ::itk::Statistics::MeasurementVectorTraits::SetLength()
>
> in the appropriate places, both my code and the test work properly. I just wanted to see if I'm missing anything before I check in the fix.
>
> Thanks,
> Nick
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20100712/7827f768/attachment.htm>
More information about the Insight-developers
mailing list