[ITK] (no subject)
Bradley Lowekamp
blowekamp at mail.nih.gov
Mon Oct 27 09:11:47 EDT 2014
Hello,
The Histogram class is derived from the itk::Object class. Just about all ITK Object must manage by smart pointers, and must be dynamically created. The typical usage of an object type is:
HistogramType::Pointer histogramPointer = HistogramType::New();
This dynamically creates an Histogram, and uses the correct smart pointer type.
This particular error message:
On Oct 27, 2014, at 8:17 AM, Zein Salah <zeinsalah at gmail.com> wrote:
>
> error C2248::itk::Statistics::Histogram<TMeasurement,VMeasurementVectorSize,TFrequencyContainer>::~Histogram":
is an indication that you are passing the type by value an not by a pointer. You should pass the histogram as PointerType of the class or as a raw pointer if there is not an issue of ownership that the smart pointe need to preserve.
Brad
p.s. You didn't include any of you code that was causing the problem. This is quite a luck case where I new the cause of the error message with out even seeing the code. It's best practice to include some code so that other can see what's causing the problem.
More information about the Community
mailing list