<div dir="ltr">Hi everyone,<div><br></div><div style>I&#39;m interested in storing a number of itkImageMaskSpatial objects into a vector like structure, so that I can iterator through them. I thought that itkVectorContainer was the correct way to do this. however I can&#39;t seem to get it to compile. for instance the following example won&#39;t compile</div>
<div style><br></div><div style><div>#include &lt;itkVectorContainer.h&gt;</div><div>#include &lt;itkImageMaskSpatialObject.h&gt;<br></div><div><br></div><div>int main(int, char*[])</div><div>{</div><div>  typedef itk::ImageMaskSpatialObject&lt;3&gt;                      ImageMaskType;</div>
<div>  typedef itk::VectorContainer&lt;int, ImageMaskType&gt;            MaskContainerType;</div><div><br></div><div>  MaskContainerType::Pointer masks = MaskContainerType::New();</div><div>  return EXIT_SUCCESS;</div><div>
}</div><div><br></div><div style>The error seems to boil down to this...</div><div style><br></div><div style><div>/opt/ITK/InsightToolkit-4.2.0/Modules/Core/SpatialObjects/include/itkImageMaskSpatialObject.hxx:37: error: ‘itk::ImageMaskSpatialObject&lt;TDimension&gt;::~ImageMaskSpatialObject() [with unsigned int TDimension = 3u]’ is protected</div>
<div><br></div><div style>My question is should i just use another vector like object to hold my ImageMasks? </div><div style><br></div><div style>-Thanks.</div><div style>Luke</div></div></div></div>