[Insight-users] STL containers of itkImages?
Zachary Pincus
zpincus at stanford.edu
Thu May 5 14:30:56 EDT 2005
I typically make a STL container class of SmartPointers to the images,
e.g.:
typedef ImageType::Pointer ImagePointer
typedef std::Vector<ImagePointer> ImageVector
itk::Object subclasses have private constructors and destructors; the
public API for manipulating them is the class's New method and the
reference-counting smart pointers. This of course means that you cannot
create itk::Objects on the stack, or stuff them directly into a
container class; you instead need to use the SmartPointers for all
tasks.
A little meditation on this should show it to be a generally good idea.
Zach Pincus
Department of Biochemistry and Program in Biomedical Informatics
Stanford University School of Medicine
On May 5, 2005, at 10:57 AM, Todd Gable wrote:
> I'm trying to make a simple STL list of itkImages, but I'm running
> into compile errors "destructor could not be generated because a base
> class destructor is inaccessible". Am I missing something obvious, I
> can't seem to find any info on this via the Kitware search page.
> Thanks in advance.
>
>
> Todd
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list