[prev in list] [next in list] [prev in thread] [next in thread] 

List:       insight-users
Subject:    Re: [ITK-users] [ITK]  auto keyword and New() smart pointer
From:       "Lowekamp, Bradley (NIH/NLM/LHC) [C]" <blowekamp () mail ! nih ! gov>
Date:       2017-03-21 15:51:56
Message-ID: 0DD6EF24-7BB0-4213-BE7C-043457EF7D50 () mail ! nih ! gov
[Download RAW message or body]

[Attachment #2 (text/plain)]

Bellow is an additional line which frees the filter, and thereby the output image, \
when only a raw auto pointer is used.

On Mar 21, 2017, at 11:22 AM, Kiran Joshi \
<kiran.j88@gmail.com<mailto:kiran.j88@gmail.com>> wrote:

Hi Brad,

Thanks for correcting me.

When I replace my AddImages() function with what's below, the memory for the result \
image still gets cleaned up automatically at the correct time. Would you be able to \
give an example were the use of auto could lead to a memory leak? Since I guess I'm \
still not understanding the problem fully.

Thanks,
Kiran

ImageType::Pointer AddImages(short a, short b) {
    auto im1 = CreateImage(a);
    auto im2 = CreateImage(b);

    AddFilterType::Pointer adder = AddFilterType::New();
    adder->SetInput1(im1);
    adder->SetInput2(im2);
    adder->Update();
    auto result = adder->GetOutput();

    AddFilterType::Pointer adder2 = AddFilterType::New();
    adder2->SetInput1(im1);
    adder2->SetInput2(result);
    adder2->Update();
    auto result2 = adder2->GetOutput();

   adder2 = ITK_NULLPTR;

    return result2;
}

On Tue, 21 Mar 2017 at 14:59 Lowekamp, Bradley (NIH/NLM/LHC) [C] \
<blowekamp@mail.nih.gov<mailto:blowekamp@mail.nih.gov>> wrote: Hello,

Your code and description illustrates the problem with the implicit auto type.


Based on this simple test I think that it is probably safe to use auto to store the \
output from filters. It does not look like it interferes with the reference counting \
or leads to memory leaks, as Yann was worried about.

This can be problematic:
  auto testOutput = testFilter->GetOutput();

But that is not what you are doing in your example. When you use the "auto" type you \
need to be careful to determine if the type is a raw pointer or a smart pointer. The \
GetOutput methods returns an raw pointer without reference counting. This is the type \
auto is above.

However in your example the return type for your method is ImageType::Pointer, which \
is an ITK smart pointer. Your code adds an implicit cast for the raw pointer to ITK's \
smart pointer. And this is not made clear by the usage of auto.

HTH,
Brad


On Mar 21, 2017, at 10:49 AM, Kiran Joshi \
<kiran.j88@gmail.com<mailto:kiran.j88@gmail.com>> wrote:

Hi Francois,

Maybe I misunderstood, but I disagree with your statement that "you cannot use the \
keyword auto with these other methods"

Attached is a screenshot showing a small ITK test program in a Visual Studio \
debugging session.

The program is very simple; an AddImages() function is called, which itself calls a \
CreateImage() function twice before adding the created images and returning the \
result. Note that I have used auto when storing the image pointers returned by the \
CreateImage and AddImage functions.

On the right of the image you can see snapshots of the memory usage as the program \
executes, and I have also annotated which lines of the program were executed \
immediately before taking the snapshot.

The first snapshot show that on line 22, very little memory has been allocated, since \
we have not yet created any images. On line 23 ~16MB of memory is used when the first \
image is created. On line 24 ~32MB is used after the 2nd image is created.
On line 30 the two images are added together and the result is returned from the \
function. At this point ~48MB is used because all 3 image still exist in memory. On \
line 31 we exit from the AddImages() function and can see that the memory for two \
temporary images has been correctly deallocated, since the im1 and im2 pointers have \
gone out of scope. Finally on line 38 we exit the main() function and see that the \
memory usage returns to ~0MB, since the image variable also goes out of scope and the \
memory associated with it is deallocated.


Let me know if you see any mistakes in my tests!
Kiran

<ITKPointerTest.png>


On Tue, 21 Mar 2017 at 12:38 Francois Budin \
<francois.budin@kitware.com<mailto:francois.budin@kitware.com>> wrote: Hello Yann,

Indeed, you are correct. New() will return a smart pointer, but other methods will \
return a pointer, so you cannot use the keyword "auto" with these other methods. The \
two following links give some insight in why ITK is implemented this way: \
https://itk.org/Wiki/ITK/Examples/Utilities/ReturnObjectFromFunction \
https://itk.org/pipermail/insight-developers/2011-April/018011.html

Hope this helps,
Francois

On Tue, Mar 21, 2017 at 6:45 AM, asertyuio via Insight-users \
<insight-users@itk.org<mailto:insight-users@itk.org>> wrote:

Hi Hans,

Thanks for your answer !

I was asking that because when I use auto keyword with a filter output, it seems like \
is result in a normal point type, not a smart pointer, so a code with

auto testOutput = testFilter->GetOutput();


has not the same behavior as

 FilterOutputType::Pointer testOutput = testFilter->GetOutput();


testOutput is a smart pointer in the second case, and a normal pointer in the first \
one.

I was wondering if it could interfere with the smart pointer role (for example \
causing memory leak, or wrong reference count).

After a deeper look, New() return a smart pointer (so with auto =, no problem) and \
GetOutput() a pointer. So the second code snipset just creates another instance of a \
smart pointer.

I hope what was my question is now clearer !
Yann

Le 21/03/2017 à 01:43, Johnson, Hans J a écrit :



Yann,

It will work only if you are compiling with C++11, and you have no intention of \
sharing your code with others who may not use C++11 syntax.

ITK proper currently maintains backwards compatibility with older versions of C++.

Hans





​

_____________________________________
Powered by www.kitware.com<http://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://www.kitware.com/products/protraining.php

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://public.kitware.com/mailman/listinfo/insight-users


_____________________________________
Powered by www.kitware.com<http://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://www.kitware.com/products/protraining.php

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://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com<http://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://www.kitware.com/products/protraining.php

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://public.kitware.com/mailman/listinfo/insight-users
_______________________________________________
Community mailing list
Community@itk.org<mailto:Community@itk.org>
http://public.kitware.com/mailman/listinfo/community


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space;" class=""> <div class="">Bellow is an additional line which frees \
the filter, and thereby the output image, when only a raw auto pointer is used.</div> \
<br class=""> <div>
<blockquote type="cite" class="">
<div class="">On Mar 21, 2017, at 11:22 AM, Kiran Joshi &lt;<a \
href="mailto:kiran.j88@gmail.com" class="">kiran.j88@gmail.com</a>&gt; wrote:</div> \
<br class="Apple-interchange-newline"> <div class="">
<div dir="ltr" class="">Hi Brad,
<div class=""><br class="">
</div>
<div class="">Thanks for correcting me.</div>
<div class=""><br class="">
</div>
<div class="">When I replace my AddImages() function with what's below, the memory \
for the<span class="inbox-inbox-Apple-converted-space">&nbsp;</span><font \
face="monospace" class=""><b class="">result</b></font><span \
class="inbox-inbox-Apple-converted-space">&nbsp;</span>image  still gets cleaned up \
automatically at the correct time.<br class=""> </div>
<div class="">Would you be able to give an example were the use of <font \
face="monospace" class=""> <b class="">auto</b></font> could lead to a memory leak? \
Since I guess I'm still not understanding the problem fully.</div> <div class=""><br \
class=""> </div>
<div class="">Thanks,</div>
<div class="">Kiran</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><font face="monospace" class="">ImageType::Pointer AddImages(short a, \
short b) {</font></div> <div class=""><font face="monospace" class="">&nbsp; &nbsp; \
auto im1 = CreateImage(a);</font></div> <div class=""><font face="monospace" \
class="">&nbsp; &nbsp; auto im2 = CreateImage(b);</font></div> <div class=""><font \
face="monospace" class=""><br class=""> </font></div>
<div class=""><font face="monospace" class="">&nbsp; &nbsp; AddFilterType::Pointer \
adder = AddFilterType::New();</font></div> <div class=""><font face="monospace" \
class="">&nbsp; &nbsp; adder-&gt;SetInput1(im1);</font></div> <div class=""><font \
face="monospace" class="">&nbsp; &nbsp; adder-&gt;SetInput2(im2);</font></div> <div \
class=""><font face="monospace" class="">&nbsp; &nbsp; \
adder-&gt;Update();</font></div> <div class=""><font face="monospace" class="">&nbsp; \
&nbsp;<b class=""> auto result = adder-&gt;GetOutput();</b></font></div> <div \
class=""><font face="monospace" class=""><br class=""> </font></div>
<div class=""><font face="monospace" class="">&nbsp; &nbsp; AddFilterType::Pointer \
adder2 = AddFilterType::New();</font></div> <div class=""><font face="monospace" \
class="">&nbsp; &nbsp; adder2-&gt;SetInput1(im1);</font></div> <div class=""><font \
face="monospace" class="">&nbsp; &nbsp; adder2-&gt;SetInput2(result);</font></div> \
<div class=""><font face="monospace" class="">&nbsp; &nbsp; \
adder2-&gt;Update();</font></div> <div class=""><font face="monospace" \
class="">&nbsp; &nbsp; auto result2 = adder2-&gt;GetOutput();</font></div> <div \
class=""><span class="Apple-tab-span" style="white-space:pre"><font face="monospace" \
class=""></font></span></div> </div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>&nbsp; &nbsp;adder2 \
= ITK_NULLPTR;</div> <br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">
<div class="">
<div class=""><font face="monospace" class="">&nbsp; &nbsp; return \
result2;</font></div> <div class=""><font face="monospace" class="">}</font></div>
</div>
</div>
<br class="">
<div class="gmail_quote">
<div dir="ltr" class="">On Tue, 21 Mar 2017 at 14:59 Lowekamp, Bradley (NIH/NLM/LHC) \
[C] &lt;<a href="mailto:blowekamp@mail.nih.gov" \
class="">blowekamp@mail.nih.gov</a>&gt; wrote:<br class=""> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <div style="word-wrap:break-word" class="gmail_msg">Hello,
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">Your code and description illustrates the problem with the \
implicit auto type.</div> </div>
<div style="word-wrap:break-word" class="gmail_msg">
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">
<blockquote type="cite" class="gmail_msg">
<div dir="ltr" class="gmail_msg">
<div class="gmail_msg">Based on this simple test I think that it is probably safe to \
use&nbsp;<font face="monospace" class="gmail_msg"><b \
class="gmail_msg">auto</b></font>&nbsp;to store the output from filters. It does not \
look like it interferes with the reference counting  or leads to memory leaks, as \
Yann was worried about.</div> </div>
</blockquote>
</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
</div>
<div style="word-wrap:break-word" class="gmail_msg">
<div class="gmail_msg">This can be problematic:</div>
</div>
<div style="word-wrap:break-word" class="gmail_msg">
<div class="gmail_msg">&nbsp; auto testOutput = testFilter-&gt;GetOutput();</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
</div>
<div style="word-wrap:break-word" class="gmail_msg">
<div class="gmail_msg">But that is not what you are doing in your example. When you \
use the "auto" type you need to be careful to determine if the type is a raw pointer \
or a smart pointer. The GetOutput methods returns an raw pointer without reference \
counting.  This is the type auto is above.</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">However in your example the return type for your method is \
ImageType::Pointer, which is an ITK smart pointer. Your code adds an implicit cast \
for the raw pointer to ITK's smart pointer. And this is not made clear by the usage \
of auto.</div> <div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">HTH,</div>
<div class="gmail_msg">Brad</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg"><br class="gmail_msg">
<div class="gmail_msg">
<blockquote type="cite" class="gmail_msg"></blockquote>
</div>
</div>
</div>
<div style="word-wrap:break-word" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg">
<blockquote type="cite" class="gmail_msg">
<div class="gmail_msg">On Mar 21, 2017, at 10:49 AM, Kiran Joshi &lt;<a \
href="mailto:kiran.j88@gmail.com" class="gmail_msg" \
target="_blank">kiran.j88@gmail.com</a>&gt; wrote:</div> <br class="gmail_msg \
m_-7466972166993527894Apple-interchange-newline"> </blockquote>
</div>
</div>
</div>
<div style="word-wrap:break-word" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg">
<blockquote type="cite" class="gmail_msg">
<div class="gmail_msg">
<div dir="ltr" class="gmail_msg">Hi Francois,
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">Maybe I misunderstood, but I disagree with your statement that \
&quot;you cannot use the keyword auto with these other methods&quot;</div> <div \
class="gmail_msg"><br class="gmail_msg"> </div>
<div class="gmail_msg">Attached is a screenshot showing a small ITK test program in a \
Visual Studio debugging session.&nbsp;</div> <div class="gmail_msg"><br \
class="gmail_msg"> </div>
<div class="gmail_msg">The program is very simple; an AddImages() function is called, \
which itself calls a CreateImage() function twice before adding the created images \
and returning the result.</div> <div class="gmail_msg">Note that I have used <font \
face="monospace" class="gmail_msg"> <b class="gmail_msg">auto</b></font>&nbsp;when \
storing the image pointers returned by the CreateImage and AddImage functions.</div> \
<div class="gmail_msg"><br class="gmail_msg"> </div>
<div class="gmail_msg">On the right of the image you can see snapshots of the memory \
usage as the program executes, and I have also annotated which lines of the program \
were executed immediately before taking the snapshot.</div> <div \
class="gmail_msg"><br class="gmail_msg"> </div>
<div class="gmail_msg">The first snapshot show that on line 22, very little memory \
has been allocated, since we have not yet created any images.</div> <div \
class="gmail_msg">On line 23 ~16MB of memory is used when the first image is \
created.</div> <div class="gmail_msg">On line 24 ~32MB is used after the 2nd image is \
created.</div> <div class="gmail_msg">On line 30 the two images are added together \
and the result is returned from the function. At this point ~48MB is used because all \
3 image still exist in memory.</div> <div class="gmail_msg">On line 31 we exit from \
the AddImages() function and can see that the memory for two temporary images has \
been correctly deallocated, since the <font face="monospace" class="gmail_msg"><b \
class="gmail_msg">im1</b></font> and <font face="monospace" class="gmail_msg"> <b \
class="gmail_msg">im2</b></font> pointers have gone out of scope.</div> <div \
class="gmail_msg">Finally on line 38 we exit the main() function and see that the \
memory usage returns to ~0MB, since the <font face="monospace" class="gmail_msg"><b \
class="gmail_msg">image</b></font> variable also goes out of scope and the memory \
associated with it is deallocated.</div> <div class="gmail_msg"><br \
class="gmail_msg"> </div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
<div class="gmail_msg">Let me know if you see any mistakes in my tests!</div>
<div class="gmail_msg">Kiran</div>
<div class="gmail_msg"><br class="gmail_msg">
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<div style="word-wrap:break-word" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg">
<blockquote type="cite" class="gmail_msg">
<div class="gmail_msg">
<div dir="ltr" class="gmail_msg"><span \
id="m_-7466972166993527894cid:15af1551a065f63678a1" \
class="gmail_msg">&lt;ITKPointerTest.png&gt;</span> <div class="gmail_msg"><br \
class="gmail_msg"> </div>
<br class="gmail_msg">
<div class="gmail_quote gmail_msg">
<div dir="ltr" class="gmail_msg">On Tue, 21 Mar 2017 at 12:38 Francois Budin &lt;<a \
href="mailto:francois.budin@kitware.com" class="gmail_msg" \
target="_blank">francois.budin@kitware.com</a>&gt; wrote:<br class="gmail_msg"> \
</div> <blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"> <div dir="ltr" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg">Hello Yann,<br class="gmail_msg">
<br class="gmail_msg">
</div>
Indeed, you are correct. New() will return a smart pointer, but other methods will \
return a pointer, so you cannot use the keyword &quot;auto&quot; with these other \
methods.<br class="gmail_msg"> </div>
The two following links give some insight in why ITK is implemented this way:<br \
class="gmail_msg"> <a \
href="https://itk.org/Wiki/ITK/Examples/Utilities/ReturnObjectFromFunction" \
class="gmail_msg" target="_blank">https://itk.org/Wiki/ITK/Examples/Utilities/ReturnObjectFromFunction</a><br \
class="gmail_msg"> <a \
href="https://itk.org/pipermail/insight-developers/2011-April/018011.html" \
class="gmail_msg" target="_blank">https://itk.org/pipermail/insight-developers/2011-April/018011.html</a><br \
class="gmail_msg"> <br class="gmail_msg">
</div>
Hope this helps,<br class="gmail_msg">
</div>
Francois<br class="gmail_msg">
</div>
<div class="gmail_extra gmail_msg"><br class="gmail_msg">
<div class="gmail_quote gmail_msg">On Tue, Mar 21, 2017 at 6:45 AM, asertyuio via \
Insight-users <span dir="ltr" class="gmail_msg">&lt;<a \
href="mailto:insight-users@itk.org" class="gmail_msg" \
target="_blank">insight-users@itk.org</a>&gt;</span> wrote:<br class="gmail_msg"> \
<blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex"> <div text="#000000" bgcolor="#FFFFFF" \
class="gmail_msg"> <div class="gmail_msg \
m_-7466972166993527894m_-3661160424353991923m_4393718566787835312markdown-here-wrapper">
 <p style="margin:0px 0px 1.2em!important" class="gmail_msg">Hi Hans,</p>
<p style="margin:0px 0px 1.2em!important" class="gmail_msg">Thanks for your answer \
!</p> <p style="margin:0px 0px 1.2em!important" class="gmail_msg">I was asking that \
because when I use auto keyword with a filter output, it seems like is result in a \
normal point type, not a smart pointer, so a code with</p> <pre \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em \
0px" class="gmail_msg"><code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px \
solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important" \
class="gmail_msg">auto testOutput = testFilter-&gt;GetOutput(); </code></pre>
<p style="margin:0px 0px 1.2em!important" class="gmail_msg">has not the same behavior \
as</p> <pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em \
0px" class="gmail_msg"><code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre-wrap;overflow:auto;border-radius:3px;border:1px \
solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important" \
class="gmail_msg"> FilterOutputType::Pointer testOutput = testFilter-&gt;GetOutput(); \
</code></pre> <p style="margin:0px 0px 1.2em!important" class="gmail_msg"><code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline" \
class="gmail_msg">testOutput</code>  is a smart pointer in the second case, and a \
normal pointer in the first one.</p> <p style="margin:0px 0px 1.2em!important" \
class="gmail_msg">I was wondering if it could interfere with the smart pointer role \
(for example causing memory leak, or wrong reference count).</p> <p style="margin:0px \
0px 1.2em!important" class="gmail_msg">After a deeper look, <code \
style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline" \
class="gmail_msg"> New()</code> return a smart pointer (so with auto =, no problem) \
and <code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px \
0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid \
rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline" \
class="gmail_msg"> GetOutput()</code> a pointer. So the second code snipset just \
creates another instance of a smart pointer.</p> <p style="margin:0px 0px \
1.2em!important" class="gmail_msg">I hope what was my question is now clearer !<br \
class="gmail_msg"> Yann</p>
<span class="gmail_msg">
<p style="margin:0px 0px 1.2em!important" class="gmail_msg">Le 21/03/2017 Ã  01:43, \
Johnson, Hans J a écrit :</p> <div style="margin:0px 0px 1.2em!important" \
class="gmail_msg"><br class="m_-7466972166993527894webkit-block-placeholder \
gmail_msg"> </div>
<div class="gmail_msg \
m_-7466972166993527894m_-3661160424353991923m_4393718566787835312markdown-here-exclude">
 <div class="gmail_msg"><br class="m_-7466972166993527894webkit-block-placeholder \
gmail_msg"> </div>
<blockquote type="cite" class="gmail_msg">
<pre class="gmail_msg">Yann,

It will work only if you are compiling with C&#43;&#43;11, and you have no intention \
of sharing your code with others who may not use C&#43;&#43;11 syntax.

ITK proper currently maintains backwards compatibility with older versions of \
C&#43;&#43;.

Hans


</pre>
</blockquote>
<div class="gmail_msg"><br class="m_-7466972166993527894webkit-block-placeholder \
gmail_msg"> </div>
</div>
<div style="margin:0px 0px 1.2em!important" class="gmail_msg"><br \
class="m_-7466972166993527894webkit-block-placeholder gmail_msg"> </div>
<div title="MDH:PHA&#43;SGkgSGFucyw8L3A&#43;PHA&#43;VGhhbmtzIGZvciB5b3VyIGFuc3dlciAhPG \
JyPjwvcD48cD5JIHdhcyBhc2tpbmcgdGhhdCBiZWNhdXNlIHdoZW4gSSB1c2UgYXV0byBrZXl3b3JkIHdpdGggYSBmaWx0
 ZXIgb3V0cHV0LCBpdCBzZWVtcyBsaWtlIGlzIHJlc3VsdCBpbiBhIG5vcm1hbCBwb2ludCB0eXBl
LCBub3QgYSBzbWFydCBwb2ludGVyLCBzbyBhIGNvZGUgd2l0aDwvcD5gYGA8YnI&#43;YXV0byB0ZXN0
T3V0cHV0ID0gdGVzdEZpbHRlci0mZ3Q7R2V0T3V0cHV0KCk7PGJyPmBgYDxwPmhhcyBub3QgdGhl
IHNhbWUgYmVoYXZpb3IgYXM8L3A&#43;PHA&#43;YGBgPGJyPgpGaWx0ZXJPdXRwdXRUeXBlOjpQb2ludGVy
IHRlc3RPdXRwdXQgPSB0ZXN0RmlsdGVyLSZndDtHZXRPdXRwdXQoKTs8L3A&#43;PHA&#43;YGBgPC9wPjxw
PmB0ZXN0T3V0cHV0YCBpcyBhIHNtYXJ0IHBvaW50ZXIgaW4gdGhlIHNlY29uZCBjYXNlLCBhbmQg
YSBub3JtYWwgcG9pbnRlciBpbiB0aGUgZmlyc3Qgb25lLjxicj48L3A&#43;PHA&#43;SSB3YXMgd29uZGVy
aW5nIGlmIGl0IGNvdWxkIGludGVyZmVyZSB3aXRoIHRoZSBzbWFydCBwb2ludGVyIHJvbGUgKGZv
ciBleGFtcGxlIGNhdXNpbmcgbWVtb3J5IGxlYWssIG9yIHdyb25nIHJlZmVyZW5jZSBjb3VudCku
PC9wPjxwPkFmdGVyIGEgZGVlcGVyIGxvb2ssIGBOZXcoKWAgcmV0dXJuIGEgc21hcnQgcG9pbnRl
ciAoc28gd2l0aCBhdXRvID0sIG5vIHByb2JsZW0pIGFuZCBgR2V0T3V0cHV0KClgIGEgcG9pbnRl
ci4gU28gdGhlIHNlY29uZCBjb2RlIHNuaXBzZXQganVzdCBjcmVhdGVzIGFub3RoZXIgaW5zdGFu
Y2Ugb2YgYSBzbWFydCBwb2ludGVyLjxicj48L3A&#43;SSBob3BlIG15IHF1ZXN0aW9uIGlzIGNsZWFy
ZXIgITxicj5ZYW5uPGJyPjxicj48ZGl2IGNsYXNzPSJtb3otY2l0ZS1wcmVmaXgiPkxlIDIxLzAz
LzIwMTcgw6AgMDE6NDMsIEpvaG5zb24sIEhhbnMgSiBhIMOpY3JpdCZuYnNwOzo8YnI&#43;PC9kaXY&#43;
PGJsb2NrcXVvdGUgY2l0ZT0ibWlkOjdEOTRGMDE2LTE4QTctNEY4OS05MzYxLTQ4NkFBNjU2MUU4
RUB1aW93YS5lZHUiIHR5cGU9ImNpdGUiPjxwcmUgd3JhcD0iIj5ZYW5uLAoKSXQgd2lsbCB3b3Jr
IG9ubHkgaWYgeW91IGFyZSBjb21waWxpbmcgd2l0aCBDKysxMSwgYW5kIHlvdSBoYXZlIG5vIGlu
dGVudGlvbiBvZiBzaGFyaW5nIHlvdXIgY29kZSB3aXRoIG90aGVycyB3aG8gbWF5IG5vdCB1c2Ug
QysrMTEgc3ludGF4LgoKSVRLIHByb3BlciBjdXJyZW50bHkgbWFpbnRhaW5zIGJhY2t3YXJkcyBj
b21wYXRpYmlsaXR5IHdpdGggb2xkZXIgdmVyc2lvbnMgb2YgQysrLgoKSGFucwoKCjwvcHJlPgoK
        PC9ibG9ja3F1b3RlPjxicj4=" \
style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0" \
class="gmail_msg"> ​</div>
</span></div>
</div>
<br class="gmail_msg">
_____________________________________<br class="gmail_msg">
Powered by <a href="http://www.kitware.com/" rel="noreferrer" class="gmail_msg" \
target="_blank"> www.kitware.com</a><br class="gmail_msg">
<br class="gmail_msg">
Visit other Kitware open-source projects at<br class="gmail_msg">
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" \
class="gmail_msg" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br \
class="gmail_msg"> <br class="gmail_msg">
Kitware offers ITK Training Courses, for more information visit:<br \
class="gmail_msg"> <a href="http://www.kitware.com/products/protraining.php" \
rel="noreferrer" class="gmail_msg" \
target="_blank">http://www.kitware.com/products/protraining.php</a><br \
class="gmail_msg"> <br class="gmail_msg">
Please keep messages on-topic and check the ITK FAQ at:<br class="gmail_msg">
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" class="gmail_msg" \
target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br class="gmail_msg"> <br \
class="gmail_msg"> Follow this link to subscribe/unsubscribe:<br class="gmail_msg">
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" \
class="gmail_msg" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br \
class="gmail_msg"> <br class="gmail_msg">
</blockquote>
</div>
<br class="gmail_msg">
</div>
_____________________________________<br class="gmail_msg">
Powered by <a href="http://www.kitware.com/" rel="noreferrer" class="gmail_msg" \
target="_blank"> www.kitware.com</a><br class="gmail_msg">
<br class="gmail_msg">
Visit other Kitware open-source projects at<br class="gmail_msg">
<a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" \
class="gmail_msg" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br \
class="gmail_msg"> <br class="gmail_msg">
Kitware offers ITK Training Courses, for more information visit:<br \
class="gmail_msg"> <a href="http://www.kitware.com/products/protraining.php" \
rel="noreferrer" class="gmail_msg" \
target="_blank">http://www.kitware.com/products/protraining.php</a><br \
class="gmail_msg"> <br class="gmail_msg">
Please keep messages on-topic and check the ITK FAQ at:<br class="gmail_msg">
<a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer" class="gmail_msg" \
target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br class="gmail_msg"> <br \
class="gmail_msg"> Follow this link to subscribe/unsubscribe:<br class="gmail_msg">
<a href="http://public.kitware.com/mailman/listinfo/insight-users" rel="noreferrer" \
class="gmail_msg" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br \
class="gmail_msg"> </blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
<div style="word-wrap:break-word" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg">
<blockquote type="cite" class="gmail_msg">
<div class="gmail_msg">_____________________________________<br class="gmail_msg">
Powered by <a href="http://www.kitware.com/" class="gmail_msg" \
target="_blank">www.kitware.com</a><br class="gmail_msg"> <br class="gmail_msg">
Visit other Kitware open-source projects at<br class="gmail_msg">
<a href="http://www.kitware.com/opensource/opensource.html" class="gmail_msg" \
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br \
class="gmail_msg"> <br class="gmail_msg">
Kitware offers ITK Training Courses, for more information visit:<br \
class="gmail_msg"> <a href="http://www.kitware.com/products/protraining.php" \
class="gmail_msg" target="_blank">http://www.kitware.com/products/protraining.php</a><br \
class="gmail_msg"> <br class="gmail_msg">
Please keep messages on-topic and check the ITK FAQ at:<br class="gmail_msg">
<a href="http://www.itk.org/Wiki/ITK_FAQ" class="gmail_msg" \
target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br class="gmail_msg"> <br \
class="gmail_msg"> Follow this link to subscribe/unsubscribe:<br class="gmail_msg">
<a href="http://public.kitware.com/mailman/listinfo/insight-users" class="gmail_msg" \
target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br \
class="gmail_msg"> </div>
</blockquote>
</div>
</div>
</div>
<div style="word-wrap:break-word" class="gmail_msg">
<div class="gmail_msg">
<div class="gmail_msg">
<blockquote type="cite" class="gmail_msg">
<div class="gmail_msg">_______________________________________________<br \
class="gmail_msg"> Community mailing list<br class="gmail_msg">
<a href="mailto:Community@itk.org" class="gmail_msg" \
target="_blank">Community@itk.org</a><br class="gmail_msg"> <a \
href="http://public.kitware.com/mailman/listinfo/community" class="gmail_msg" \
target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br \
class="gmail_msg"> </div>
</blockquote>
</div>
<br class="gmail_msg">
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>



_____________________________________
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://www.kitware.com/products/protraining.php

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://public.kitware.com/mailman/listinfo/insight-users

--===============0537706881==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic