[Insight-users] RE: Problem with HistogramType::ConstIterator inside function

Radhika Sivaramakrishna radhika.sivaramakrishna at synarc.com
Wed, 11 Feb 2004 14:39:29 -0800


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C3F0EF.E90FF836
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C3F0EF.E90FF836"


------_=_NextPart_001_01C3F0EF.E90FF836
Content-Type: text/plain

Hi Luis,
You are the first person I know who looked through 145 lines of error so
quickly and actually appeared to be enjoying the task.
Well, unfortunately, the suggestion did not work. First of all, line 37 has
no typedef in it. But it references line 26 where I put in a typename but
that did not work. Also I have used MaskImageFilter through a function
before and have not had this problem, so I added in typename for the
HistogramGenerator and that also did not work.

I went ahead and just commented out the part where the Histogram iterators
are called and used, and it compiled fine. So the problem is somewhere there
with the iterators. Is there any other way of defining the histogram
iterators to bypass this problem?

I have attached just the HistogramThreshold.txx with this email (with the
histogram stuff commented out).

Thanks
Radhika


-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com] 
Sent: Wednesday, February 11, 2004 2:15 PM
To: Radhika Sivaramakrishna
Cc: Insight-users at itk.org
Subject: Re: [Insight-users] RE: Problem with HistogramType::ConstIterator
inside function



Hi Radhika,


Aja !,    You were hiding the evidence !


You got 145 lines of error messages,
but only shared 2 of them with us...


That's not what we could call "Generous".   8-/


-----


The problem is shown around line 20 of the error
message:


 > >*)::ImageType>::Pointer' is implicitly a typename


and


 > warning: implicit typename is deprecated,



GCC doesn't accept implicit typenames
(since version 3.2, I think...)


Solution:


Go to line 37 of your file HistogramThreshold.txx

and put a "typename" keyword after the "typedef".

It will look like


    typedef   typename    itk::.....





Regards,



   Luis



--------------------------------
Radhika Sivaramakrishna wrote:

> Hi Luis,
> You are right, those are not the only two lines I get. I have attached 
> the entire error which I get.
> 
> However,these errors I got are on Linux so not Visual C++.
> Also, I have used this kind of template function before ie. Only using 
> PixelType and not ImageType without a problem.
> 
> Hope you can figure out what is happening from this long error message.
> Thanks
> Radhika
> 
> 
> Building object file PostExbrain.o...
> In file included from 
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.h:19,
>                  from 
> /export/jfs/rsivaram/PostExbrain-code/PostExbrain.cxx:26:
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx: In 
> function `void
>    HistogramThreshold(const itk::Image<PixelType, 3>*, 
> itk::Image<PixelType,
>    3>*)':
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:37: warning:
`
>    typename itk::MaskImageFilter<HistogramThreshold(const 
> itk::Image<PixelType,
>    3>*, itk::Image<PixelType, 3>*)::ImageType, HistogramThreshold(const
>    itk::Image<PixelType, 3>*, itk::Image<PixelType, 3>*)::ImageType,
>    HistogramThreshold(const itk::Image<PixelType, 3>*, 
> itk::Image<PixelType,
>    3>*)::ImageType>::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:37: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:38: warning:
`
>    typename itk::BinaryThresholdImageFilter<HistogramThreshold(const
>    itk::Image<PixelType, 3>*, itk::Image<PixelType, 3>*)::ImageType,
>    HistogramThreshold(const itk::Image<PixelType, 3>*, 
> itk::Image<PixelType,
>    3>*)::ImageType>::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:38: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:40: warning:
`
>    typename itk::ImageFileReader<HistogramThreshold(const 
> itk::Image<PixelType,
>    3>*, itk::Image<PixelType, 3>*)::ImageType,
>    itk::DefaultConvertPixelTraits<HistogramThreshold(const
>    itk::Image<PixelType, 3>*, itk::Image<PixelType, 
> 3>*)::ImageType::PixelType>
>    >::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:40: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:41: warning:
`
>    typename itk::ImageFileReader<HistogramThreshold(const 
> itk::Image<PixelType,
>    3>*, itk::Image<PixelType, 3>*)::ImageType,
>    itk::DefaultConvertPixelTraits<HistogramThreshold(const
>    itk::Image<PixelType, 3>*, itk::Image<PixelType, 
> 3>*)::ImageType::PixelType>
>    >::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:41: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:42: warning:
`
>    typename itk::ImageFileWriter<HistogramThreshold(const 
> itk::Image<PixelType,
>    3>*, itk::Image<PixelType, 3>*)::ImageType>::Pointer' is implicitly a
>    typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:42: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:43: warning:
`
>    typename itk::ConnectedComponentImageFilter<HistogramThreshold(const
>    itk::Image<PixelType, 3>*, itk::Image<PixelType, 3>*)::ImageType,
>    HistogramThreshold(const itk::Image<PixelType, 3>*, 
> itk::Image<PixelType,
>    3>*)::IntImageType>::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:43: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:44: warning:
`
>    typename itk::RelabelComponentImageFilter<HistogramThreshold(const
>    itk::Image<PixelType, 3>*, itk::Image<PixelType, 3>*)::IntImageType,
>    HistogramThreshold(const itk::Image<PixelType, 3>*, 
> itk::Image<PixelType,
>    3>*)::ImageType>::Pointer' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:44: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:45: warning:
`
>    typename itk::BinaryErodeImageFilter<HistogramThreshold(const
>    itk::Image<PixelType, 3>*, itk::Image<PixelType, 3>*)::ImageType,
>    HistogramThreshold(const itk::Image<PixelType, 3>*, 
> itk::Image<PixelType,
>    3>*)::ImageType, HistogramThreshold(const itk::Image<PixelType, 3>*,
>    itk::Image<PixelType, 3>*)::StructuringElementType>::Pointer' is 
> implicitly
>    a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:45: 
> warning: implicit
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:46: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:74: warning:
`
>    typename
>    
> itk::Statistics::ScalarImageToHistogramGenerator<HistogramThreshold(const
>    itk::Image<PixelType, 3>*, itk::Image<PixelType, 
> 3>*)::ImageType>::Pointer'
>    is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:74: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:86: warning:
`
>    typename
>    
> itk::Statistics::ScalarImageToHistogramGenerator<HistogramThreshold(const
>    itk::Image<PixelType, 3>*, itk::Image<PixelType,
>    3>*)::ImageType>::HistogramType' is implicitly a typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:86: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:94: parse 
> error
>    before `=' token
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:95: parse 
> error
>    before `=' token
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:130: 
> warning: `
>    typename itk::Image<PixelType, Dimension>::RegionType' is implicitly a
>    typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:130: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:158: 
> warning: `
>    typename itk::Image<PixelType, Dimension>::Pointer' is implicitly a 
> typename
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:158: 
> warning: implicit
>    typename is deprecated, please see the documentation for details
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx: In 
> function `void
>    HistogramThreshold(const itk::Image<PixelType, 3>*, 
> itk::Image<PixelType,
>    3>*) [with PixelType = PixelType]':
> /export/jfs/rsivaram/PostExbrain-code/PostExbrain.cxx:262:   
> instantiated from here
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:99: `itr'
>    undeclared (first use this function)
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:99: (Each
>    undeclared identifier is reported only once for each function it
appears
>    in.)
> /export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:100: `end'
>    undeclared (first use this function)
> make[1]: *** [PostExbrain.o] Error 1
> make: *** [default_target] Error 2
> 
> 
>                                                     
> ----------------------------------------------------- 
> Confidentiality Notice.
> This email message is for the sole use of the intended recipient(s) and 
> may contain confidential and privileged information. Any unauthorized 
> review, use, disclosure or distribution is prohibited. If you are not 
> the intended recipient, please contact the sender by reply email and 
> destroy all copies of the original message. If you are the intended 
> recipient, please be advised that the content of this message is subject 
> to access, review and disclosure by the sender's Email System
Administrator.
> 


                                                     
-----------------------------------------------------  
Confidentiality Notice. 
This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. If you are the intended recipient, please be
advised that the content of this message is subject to access, review and
disclosure by the sender's Email System Administrator.
  


------_=_NextPart_001_01C3F0EF.E90FF836
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2656.87">
<TITLE>RE: [Insight-users] RE: Problem with =
HistogramType::ConstIterator inside function</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi Luis,</FONT>
<BR><FONT SIZE=3D2>You are the first person I know who looked through =
145 lines of error so quickly and actually appeared to be enjoying the =
task.</FONT></P>

<P><FONT SIZE=3D2>Well, unfortunately, the suggestion did not work. =
First of all, line 37 has no typedef in it. But it references line 26 =
where I put in a typename but that did not work. Also I have used =
MaskImageFilter through a function before and have not had this =
problem, so I added in typename for the HistogramGenerator and that =
also did not work.</FONT></P>

<P><FONT SIZE=3D2>I went ahead and just commented out the part where =
the Histogram iterators are called and used, and it compiled fine. So =
the problem is somewhere there with the iterators. Is there any other =
way of defining the histogram iterators to bypass this =
problem?</FONT></P>

<P><FONT SIZE=3D2>I have attached just the HistogramThreshold.txx with =
this email (with the histogram stuff commented out).</FONT>
</P>

<P><FONT SIZE=3D2>Thanks</FONT>
<BR><FONT SIZE=3D2>Radhika</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Luis Ibanez [<A =
HREF=3D"mailto:luis.ibanez at kitware.com">mailto:luis.ibanez at kitware.com</=
A>] </FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, February 11, 2004 2:15 PM</FONT>
<BR><FONT SIZE=3D2>To: Radhika Sivaramakrishna</FONT>
<BR><FONT SIZE=3D2>Cc: Insight-users at itk.org</FONT>
<BR><FONT SIZE=3D2>Subject: Re: [Insight-users] RE: Problem with =
HistogramType::ConstIterator inside function</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>Hi Radhika,</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Aja !,&nbsp;&nbsp;&nbsp; You were hiding the evidence =
!</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>You got 145 lines of error messages,</FONT>
<BR><FONT SIZE=3D2>but only shared 2 of them with us...</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>That's not what we could call =
&quot;Generous&quot;.&nbsp;&nbsp; 8-/</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>-----</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>The problem is shown around line 20 of the =
error</FONT>
<BR><FONT SIZE=3D2>message:</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>&nbsp;&gt; &gt;*)::ImageType&gt;::Pointer' is =
implicitly a typename</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>and</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>&nbsp;&gt; warning: implicit typename is =
deprecated,</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>GCC doesn't accept implicit typenames</FONT>
<BR><FONT SIZE=3D2>(since version 3.2, I think...)</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Solution:</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Go to line 37 of your file =
HistogramThreshold.txx</FONT>
</P>

<P><FONT SIZE=3D2>and put a &quot;typename&quot; keyword after the =
&quot;typedef&quot;.</FONT>
</P>

<P><FONT SIZE=3D2>It will look like</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; typedef&nbsp;&nbsp; =
typename&nbsp;&nbsp;&nbsp; itk::.....</FONT>
</P>
<BR>
<BR>
<BR>
<BR>

<P><FONT SIZE=3D2>Regards,</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>&nbsp;&nbsp; Luis</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>--------------------------------</FONT>
<BR><FONT SIZE=3D2>Radhika Sivaramakrishna wrote:</FONT>
</P>

<P><FONT SIZE=3D2>&gt; Hi Luis,</FONT>
<BR><FONT SIZE=3D2>&gt; You are right, those are not the only two lines =
I get. I have attached </FONT>
<BR><FONT SIZE=3D2>&gt; the entire error which I get.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; However,these errors I got are on Linux so not =
Visual C++.</FONT>
<BR><FONT SIZE=3D2>&gt; Also, I have used this kind of template =
function before ie. Only using </FONT>
<BR><FONT SIZE=3D2>&gt; PixelType and not ImageType without a =
problem.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Hope you can figure out what is happening from =
this long error message.</FONT>
<BR><FONT SIZE=3D2>&gt; Thanks</FONT>
<BR><FONT SIZE=3D2>&gt; Radhika</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Building object file PostExbrain.o...</FONT>
<BR><FONT SIZE=3D2>&gt; In file included from </FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.h:19,</FONT>
<BR><FONT =
SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; from </FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/PostExbrain.cxx:26:</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx: In =
</FONT>
<BR><FONT SIZE=3D2>&gt; function `void</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; HistogramThreshold(const =
itk::Image&lt;PixelType, 3&gt;*, </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; 3&gt;*)':</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:37: =
warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename =
itk::MaskImageFilter&lt;HistogramThreshold(const </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; 3&gt;*, =
itk::Image&lt;PixelType, 3&gt;*)::ImageType, =
HistogramThreshold(const</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; itk::Image&lt;PixelType, =
3&gt;*, itk::Image&lt;PixelType, 3&gt;*)::ImageType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; HistogramThreshold(const =
itk::Image&lt;PixelType, 3&gt;*, </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; =
3&gt;*)::ImageType&gt;::Pointer' is implicitly a typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:37: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:38: =
warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename =
itk::BinaryThresholdImageFilter&lt;HistogramThreshold(const</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; itk::Image&lt;PixelType, =
3&gt;*, itk::Image&lt;PixelType, 3&gt;*)::ImageType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; HistogramThreshold(const =
itk::Image&lt;PixelType, 3&gt;*, </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; =
3&gt;*)::ImageType&gt;::Pointer' is implicitly a typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:38: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:40: =
warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename =
itk::ImageFileReader&lt;HistogramThreshold(const </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; 3&gt;*, =
itk::Image&lt;PixelType, 3&gt;*)::ImageType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; =
itk::DefaultConvertPixelTraits&lt;HistogramThreshold(const</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; itk::Image&lt;PixelType, =
3&gt;*, itk::Image&lt;PixelType, </FONT>
<BR><FONT SIZE=3D2>&gt; 3&gt;*)::ImageType::PixelType&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; &gt;::Pointer' is implicitly =
a typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:40: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:41: =
warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename =
itk::ImageFileReader&lt;HistogramThreshold(const </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; 3&gt;*, =
itk::Image&lt;PixelType, 3&gt;*)::ImageType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; =
itk::DefaultConvertPixelTraits&lt;HistogramThreshold(const</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; itk::Image&lt;PixelType, =
3&gt;*, itk::Image&lt;PixelType, </FONT>
<BR><FONT SIZE=3D2>&gt; 3&gt;*)::ImageType::PixelType&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; &gt;::Pointer' is implicitly =
a typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:41: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:42: =
warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename =
itk::ImageFileWriter&lt;HistogramThreshold(const </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; 3&gt;*, =
itk::Image&lt;PixelType, 3&gt;*)::ImageType&gt;::Pointer' is implicitly =
a</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:42: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:43: =
warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename =
itk::ConnectedComponentImageFilter&lt;HistogramThreshold(const</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; itk::Image&lt;PixelType, =
3&gt;*, itk::Image&lt;PixelType, 3&gt;*)::ImageType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; HistogramThreshold(const =
itk::Image&lt;PixelType, 3&gt;*, </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; =
3&gt;*)::IntImageType&gt;::Pointer' is implicitly a typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:43: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:44: =
warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename =
itk::RelabelComponentImageFilter&lt;HistogramThreshold(const</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; itk::Image&lt;PixelType, =
3&gt;*, itk::Image&lt;PixelType, 3&gt;*)::IntImageType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; HistogramThreshold(const =
itk::Image&lt;PixelType, 3&gt;*, </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; =
3&gt;*)::ImageType&gt;::Pointer' is implicitly a typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:44: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:45: =
warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename =
itk::BinaryErodeImageFilter&lt;HistogramThreshold(const</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; itk::Image&lt;PixelType, =
3&gt;*, itk::Image&lt;PixelType, 3&gt;*)::ImageType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; HistogramThreshold(const =
itk::Image&lt;PixelType, 3&gt;*, </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; 3&gt;*)::ImageType, HistogramT=
hreshold(const itk::Image&lt;PixelType, 3&gt;*,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; itk::Image&lt;PixelType, =
3&gt;*)::StructuringElementType&gt;::Pointer' is </FONT>
<BR><FONT SIZE=3D2>&gt; implicitly</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; a typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:45: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:46: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:74: =
warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; =
itk::Statistics::ScalarImageToHistogramGenerator&lt;HistogramThreshold(c=
onst</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; itk::Image&lt;PixelType, =
3&gt;*, itk::Image&lt;PixelType, </FONT>
<BR><FONT SIZE=3D2>&gt; 3&gt;*)::ImageType&gt;::Pointer'</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; is implicitly a =
typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:74: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:86: =
warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; =
itk::Statistics::ScalarImageToHistogramGenerator&lt;HistogramThreshold(c=
onst</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; itk::Image&lt;PixelType, =
3&gt;*, itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; =
3&gt;*)::ImageType&gt;::HistogramType' is implicitly a typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:86: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:94: parse =
</FONT>
<BR><FONT SIZE=3D2>&gt; error</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; before `=3D' token</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:95: parse =
</FONT>
<BR><FONT SIZE=3D2>&gt; error</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; before `=3D' token</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:130: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename =
itk::Image&lt;PixelType, Dimension&gt;::RegionType' is implicitly =
a</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:130: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:158: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: `</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename =
itk::Image&lt;PixelType, Dimension&gt;::Pointer' is implicitly a =
</FONT>
<BR><FONT SIZE=3D2>&gt; typename</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:158: =
</FONT>
<BR><FONT SIZE=3D2>&gt; warning: implicit</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; typename is deprecated, =
please see the documentation for details</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx: In =
</FONT>
<BR><FONT SIZE=3D2>&gt; function `void</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; HistogramThreshold(const itk::=
Image&lt;PixelType, 3&gt;*, </FONT>
<BR><FONT SIZE=3D2>&gt; itk::Image&lt;PixelType,</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; 3&gt;*) [with PixelType =3D =
PixelType]':</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/PostExbrain.cxx:262:&nbsp;&nbsp; =
</FONT>
<BR><FONT SIZE=3D2>&gt; instantiated from here</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:99: =
`itr'</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; undeclared (first use this =
function)</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:99: =
(Each</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; undeclared identifier is =
reported only once for each function it appears</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; in.)</FONT>
<BR><FONT SIZE=3D2>&gt; =
/export/jfs/rsivaram/PostExbrain-code/HistogramThreshold.txx:100: =
`end'</FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp; undeclared (first use this =
function)</FONT>
<BR><FONT SIZE=3D2>&gt; make[1]: *** [PostExbrain.o] Error 1</FONT>
<BR><FONT SIZE=3D2>&gt; make: *** [default_target] Error 2</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT =
SIZE=3D2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; =
----------------------------------------------------- </FONT>
<BR><FONT SIZE=3D2>&gt; Confidentiality Notice.</FONT>
<BR><FONT SIZE=3D2>&gt; This email message is for the sole use of the =
intended recipient(s) and </FONT>
<BR><FONT SIZE=3D2>&gt; may contain confidential and privileged =
information. Any unauthorized </FONT>
<BR><FONT SIZE=3D2>&gt; review, use, disclosure or distribution is =
prohibited. If you are not </FONT>
<BR><FONT SIZE=3D2>&gt; the intended recipient, please contact the =
sender by reply email and </FONT>
<BR><FONT SIZE=3D2>&gt; destroy all copies of the original message. If =
you are the intended </FONT>
<BR><FONT SIZE=3D2>&gt; recipient, please be advised that the content =
of this message is subject </FONT>
<BR><FONT SIZE=3D2>&gt; to access, review and disclosure by the =
sender's Email System Administrator.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>
<BR>

<P><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT =
SIZE=3D2>-----------------------------------------------------&nbsp; =
</FONT>
<BR><FONT SIZE=3D2>Confidentiality Notice. </FONT>
<BR><FONT SIZE=3D2>This email message is for the sole use of the =
intended recipient(s) and may contain confidential and privileged =
information. Any unauthorized review, use, disclosure or distribution =
is prohibited. If you are not the intended recipient, please contact =
the sender by reply email and destroy all copies of the original =
message. If you are the intended recipient, please be advised that the =
content of this message is subject to access, review and disclosure by =
the sender's Email System Administrator.</FONT></P>

<P><FONT SIZE=3D2>&nbsp;</FONT>=20
</P>

<P><FONT FACE=3D"Arial" SIZE=3D2 COLOR=3D"#000000"></FONT>&nbsp;

</BODY>
</HTML>
------_=_NextPart_001_01C3F0EF.E90FF836--

------_=_NextPart_000_01C3F0EF.E90FF836
Content-Type: application/octet-stream;
	name="HistogramThreshold.txx"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="HistogramThreshold.txx"

template <class PixelType>
void HistogramThreshold(const itk::Image< PixelType, 3> * image,
            itk::Image< PixelType, 3> * mask)
{


  typedef int                 IntType;
  const unsigned int          Dimension =3D 3;

  typedef typename itk::Image<PixelType, Dimension > ImageType;
  typedef itk::Image<IntType, Dimension > IntImageType;

  typedef itk::ImageFileReader< ImageType > ReaderType;
  typedef itk::ImageFileWriter< ImageType > WriterType;
  typedef typename itk::MaskImageFilter<ImageType,ImageType,ImageType> =
MaskFilterType;
  typedef itk::BinaryThresholdImageFilter<ImageType, ImageType> =
BinaryThresholdFilterType;
  typedef itk::ImageRegionConstIteratorWithIndex< ImageType > =
ConstIteratorType;
  typedef itk::ImageRegionIteratorWithIndex< ImageType > IteratorType;

  typedef itk::BinaryBallStructuringElement<
                        PixelType,
                        Dimension  >             =
StructuringElementType;

  typedef itk::BinaryErodeImageFilter<
                              ImageType,
                              ImageType,
                              StructuringElementType>  ErodeFilterType;

  typedef itk::BinaryDilateImageFilter<
                              ImageType,
                              ImageType,
                            StructuringElementType >  DilateFilterType;

  typedef itk::ConnectedComponentImageFilter<ImageType,IntImageType > =
CCFilterType;
  typedef itk::RelabelComponentImageFilter<IntImageType,ImageType > =
RCFilterType;

  MaskFilterType::Pointer masker =3D MaskFilterType::New();
  BinaryThresholdFilterType::Pointer thresholdermask =3D =
BinaryThresholdFilterType::New();

  ReaderType::Pointer readerimage =3D ReaderType::New();
  ReaderType::Pointer readermask =3D ReaderType::New();
  WriterType::Pointer writer =3D WriterType::New();
  CCFilterType::Pointer ccfilter =3D CCFilterType::New();
  RCFilterType::Pointer rcfilter =3D RCFilterType::New();
  ErodeFilterType::Pointer  binaryErode  =3D ErodeFilterType::New();
  DilateFilterType::Pointer binaryDilate =3D DilateFilterType::New();

  StructuringElementType structuringElement;

  // Constants =20

  PixelType background =3D   0;
  PixelType foreground =3D 255;
  unsigned int NumberOfBins =3D 128;
  float MarginalScale =3D 10.0;


  structuringElement.SetRadius( 1 );  // 3x3 structuring element

  structuringElement.CreateStructuringElement();

  binaryErode->SetKernel(  structuringElement );
  binaryDilate->SetKernel( structuringElement );
  binaryErode->SetErodeValue(foreground);
  binaryDilate->SetDilateValue(foreground);

  thresholdermask->SetOutsideValue( background );
  thresholdermask->SetInsideValue(  foreground );

  typedef typename itk::Statistics::ScalarImageToHistogramGenerator<
                                                    ImageType
                                                          >   =
HistogramGeneratorType;

  HistogramGeneratorType::Pointer histogramGenerator =3D =
HistogramGeneratorType::New();

  masker->SetInput1(image);
  masker->SetInput2(mask);
  masker->Update();

  histogramGenerator->SetInput(  masker->GetOutput() );

  histogramGenerator->SetNumberOfBins( NumberOfBins );
  histogramGenerator->SetMarginalScale( MarginalScale );
  histogramGenerator->Compute();

  typedef typename HistogramGeneratorType::HistogramType  =
HistogramType;

  const HistogramType * histogram =3D histogramGenerator->GetOutput();

  const unsigned int histogramSize =3D histogram->Size();

  std::cout << "Histogram size " << histogramSize << std::endl;

 /* HistogramType::ConstIterator itr =3D histogram->Begin();
  HistogramType::ConstIterator end =3D histogram->End();

  unsigned int bin =3D 1;
  float totalhist =3D 0;
  ++itr; // To skip the zero count
  while( itr !=3D end )
      {
    //  std::cout << "bin =3D " << bin << " frequency =3D ";
    //  std::cout << itr.GetFrequency() << std::endl;
      totalhist +=3D itr.GetFrequency();
      ++itr;
      ++bin;
      }
  std::cout << " Total " << totalhist << std::endl;
 // std::cout << " Total frequency " << histogram->GetTotalFrequency() =
<< std::endl;
//  std::cout << " Quantile at 90th percentile " << =
histogram->Quantile(0,0.90) << std::endl;

  float probability =3D 0;
  unsigned int threshold;
  bin=3D1;
  itr =3D histogram->Begin();
  ++itr; // To skip the zero count
  while( (itr !=3D end) && (probability <=3D 0.90*totalhist ))
      {
      std::cout << "bin =3D " << bin << " frequency =3D ";
      probability +=3D itr.GetFrequency();
      std::cout << probability << std::endl;
      threshold =3D bin*2;
      ++itr;
      ++bin;
      }

  std::cout << " Threshold value " << threshold << std::endl;
  std::cout << " Probability value " << probability << std::endl; */
  unsigned int threshold =3D 255;
  ImageType::RegionType region =3D image->GetBufferedRegion();
  IteratorType maskit(mask,region);
  ConstIteratorType gsit(image,region);

  gsit.GoToBegin();
  maskit.GoToBegin();
  while( ! gsit.IsAtEnd() && ! maskit.IsAtEnd())
    {
  	if (gsit.Get() > threshold)
  	{
  		maskit.Set(0);
  	}
  	++maskit;
  	++gsit;
  }

  binaryErode->SetInput(mask);
  ccfilter->SetInput(binaryErode->GetOutput());
  rcfilter->SetInput(ccfilter->GetOutput());
  rcfilter->Update();
  thresholdermask->SetInput( rcfilter->GetOutput() );
  thresholdermask->SetLowerThreshold( 1 );
  thresholdermask->SetUpperThreshold( 1 );
  binaryDilate->SetInput(thresholdermask->GetOutput());
  binaryDilate->Update();

// Copying result back into the pointer sent from main (mask)

  ImageType::Pointer temp =3D binaryDilate->GetOutput();

  ConstIteratorType tempit(temp,region); =20
  tempit.GoToBegin();
  maskit.GoToBegin();
  while( ! maskit.IsAtEnd() && ! tempit.IsAtEnd() )
  {
	maskit.Set(tempit.Get());
	++tempit;
	++maskit;
  }=20
=20

}




------_=_NextPart_000_01C3F0EF.E90FF836--