[Insight-users] How to call a destructor?

Sameer Zaheer bless.sins at gmail.com
Wed Jan 12 11:49:11 EST 2011


Hi,

I'm having some troubles with calling a destructor to a LineConstIterator
object. My code looks something like this:

typedef itk::LineConstIterator<ImageType> IteratorType;
//define image
//define imageIndex and farPoint
IteratorType it(image, imageIndex, farPoint);
IteratorType ~it();

The reason I want to destroy the object is because I want to use it again,
but with different firstIndex and lastIndex (I'm using iterator in a while
loop). So you know how to set the firstIndex and lastIndex of the iterator
(after it has been created), that could work too.

And the reason I'm repeatedly setting the firstIndex and lastIndex, is
because I want to iterate over a plane (my image is 3D), and didn't find any
class that does that. Again, if there is such a class, let me know.

Thanks,

-- 
Sameer Zaheer
Engineering Science 1T0+PEY
University of Toronto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110112/7d478ac8/attachment.htm>


More information about the Insight-users mailing list