<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
hello,<br><br>Still filtering all the image.<br><br>Steve<br><br><br><hr id="stopSpelling">Date: Fri, 5 Feb 2010 13:01:59 +0100<br>Subject: Re: [Insight-users] Apply filter only on a specific region ?<br>From: imacia@vicomtech.org<br>To: steve.harris18@hotmail.com<br>CC: luis.ibanez@kitware.com; insight-users@itk.org<br><br>Hi,<br><br>Try<br><br>medianFilter-&gt;GetOutput()-&gt;SetRequestedRegion( wantedRegion3 )<br><br>before updating. The request must be done on the output, not in the input. The pipeline calculates which is the required input to generate the output, which in turn will be the output of the previous filter, and so on.<br>
<br>Best regards<br><br>Ivan<br><br><div class="ecxgmail_quote">2010/2/5 steve harris <span dir="ltr">&lt;<a href="mailto:steve.harris18@hotmail.com">steve.harris18@hotmail.com</a>&gt;</span><br><blockquote class="ecxgmail_quote" style="padding-left: 1ex;">




<div>
Hello again,<br><br>I open again this subject because of what Louis suggested.<div class="ecxim"><br><br>&gt; or even use the SetRequrestedRegion()<br>&gt; of the Median filter directly.  <br><br></div>I was also interested in this methods so I quickly tried it but without success..<br>
<br>I didn't manage to find how to set the SetRequrestedRegion of the median filter directly ? <br>That's what I tried:<br><br>&nbsp;&nbsp;&nbsp; start3[0] = 0;<br>&nbsp;&nbsp;&nbsp; start3[1] = 0;<br>&nbsp;&nbsp;&nbsp; start3[2] = 0;<br><br>&nbsp;&nbsp;&nbsp; size3[0] = 20;<br>
&nbsp;&nbsp;&nbsp; size3[1] = 20;<br>&nbsp;&nbsp;&nbsp; size3[2] = 20;<br>&nbsp;&nbsp;&nbsp; wantedRegion3.SetIndex(start3);<br>&nbsp;&nbsp;&nbsp; wantedRegion3.SetSize(size3);<br><br>mySimpleImage-&gt;SetRequestedRegion(wantedRegion3)<br>neighRadius2[0] = 1;<br>neighRadius2[1] = 1;<br>
neighRadius2[2] = 1;<br>median-&gt;SetRadius(neighRadius2);<br>median-&gt;SetInput(mySimpleImage);<br>median-&gt;Update();<br><br>But when I display median-&gt;GetOutput() all the image has been filtred and not only my requested region...<br>
<br>Do I'm missing something ?<br><br>Regards,<br>Steve<br><br><hr>From: <a href="mailto:steve.harris18@hotmail.com">steve.harris18@hotmail.com</a><br>To: <a href="mailto:imacia@vicomtech.org">imacia@vicomtech.org</a>; <a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a><br>
Date: Tue, 26 Jan 2010 10:48:22 +0000<div class="ecxim"><br>CC: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br></div>Subject: Re: [Insight-users] Apply filter only on a specific region ?<div>
<div></div><div class="h5"><br><br>






Hello,<br><br>Just a word to say that using this pipeline<br><br>RegionOfInterestImageFilter<br>MedianImageFilter<br>PasteImageFilter<br><br>it works, I mean I quickly tried and I got a good visual result (only the part I chossed has been filtred) <br>
<br>Thanks,<br>Steve<br><br>&gt; From: <a href="mailto:imacia@vicomtech.org">imacia@vicomtech.org</a><br>&gt; To: <a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>; <a href="mailto:steve.harris18@hotmail.com">steve.harris18@hotmail.com</a><br>
&gt; CC: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>&gt; Subject: RE: [Insight-users] Apply filter only on a specific region ?<br>&gt; Date: Mon, 25 Jan 2010 18:15:20 +0100<br>&gt; <br>
&gt; Hi Luis,<br>&gt; <br>&gt; Just a question. We were discussing here at work the meaning of the<br>&gt; different regions (Largest vs Requested vs Buffered). One question we had is<br>&gt; if you can process a part of the image only by setting the Requested Region<br>
&gt; on the output, which seems quite straightforward and compatible with the ITK<br>&gt; pipeline definition. What would you get here? An image whose Largest<br>&gt; Possible Region is the same as the one you requested?<br>
&gt; <br>&gt; The idea I have is that the Requested Region is an important part of the ITK<br>&gt; pipeline and is used by the filters, at least internally, so why is its use<br>&gt; discouraged in this case?<br>&gt; <br>
&gt; Thanks in advance<br>&gt; <br>&gt; Iván<br>&gt; <br>&gt; PD: it is common the case in which we have to process only a certain part of<br>&gt; the image in medical applications, for example when we have to calculate<br>
&gt; statistics in a region of interest from a 3D image, as defined by the<br>&gt; radiologist. It may be inconsistent from the point of view image processing<br>&gt; but it works :) This is just an example but we have find many cases in which<br>
&gt; we have had to restrict ourselves only to a certain part of the image as<br>&gt; defined by the user, due to memory limitations or for a faster processing<br>&gt; among other reasons.<br>&gt; <br>&gt; <br>&gt; -----Mensaje original-----<br>
&gt; De: <a href="mailto:insight-users-bounces@itk.org">insight-users-bounces@itk.org</a> [mailto:<a href="mailto:insight-users-bounces@itk.org">insight-users-bounces@itk.org</a>] En<br>&gt; nombre de Luis Ibanez<br>
&gt; Enviado el: domingo, 24 de enero de 2010 16:11<br>&gt; Para: dsdfdff sfdsf<br>&gt; CC: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br>&gt; Asunto: Re: [Insight-users] Apply filter only on a specific region ?<br>
&gt; <br>&gt; Hi Steve,<br>&gt; <br>&gt; It depends....<br>&gt; <br>&gt; What exactly do you want at the output ?<br>&gt; <br>&gt; A) The full input input with the subregion modified ?<br>&gt; <br>&gt; or<br>&gt; <br>&gt; B) only the modified subregion ?<br>
&gt; <br>&gt; ---<br>&gt; <br>&gt; If you want (A) you will have to use a pipeline<br>&gt; such as:<br>&gt; <br>&gt; RegionOfInterestImageFilter<br>&gt; MedianImageFilter<br>&gt; PasteImageFilter<br>&gt; <br>&gt; If you want (B) you could use simply<br>
&gt; <br>&gt; <br>&gt; RegionOfInterestImageFilter<br>&gt; MedianImageFilter<br>&gt; <br>&gt; or even use the SetRequrestedRegion()<br>&gt; of the Median filter directly.  Although<br>&gt; this last option is not a recommended<br>
&gt; practice, unless you are very familiar<br>&gt; with the inner-workings of the ITK pipeline.<br>&gt; <br>&gt; <br>&gt; --<br>&gt; <br>&gt; On a side note:<br>&gt; <br>&gt; Why do you want to do such thing ?    :-)<br>
&gt; <br>&gt; From the pure image processing point of view,<br>&gt; it doesn't seem to be a good operation. You<br>&gt; will end up with an inconsistent image...<br>&gt; <br>&gt; <br>&gt; <br>&gt;      Regards,<br>&gt; <br>
&gt; <br>&gt;             Luis<br>&gt; <br>&gt; <br>&gt; --------------------------------------<br>&gt; On Fri, Jan 22, 2010 at 5:51 AM, dsdfdff sfdsf<br>&gt; &lt;<a href="mailto:steve.harris18@hotmail.com">steve.harris18@hotmail.com</a>&gt; wrote:<br>
&gt; &gt; Hello itk user,<br>&gt; &gt;<br>&gt; &gt; I was wondering if it was possible to apply a filter only on a specific<br>&gt; &gt; region of an image (like setting a bundary region)?<br>&gt; &gt;<br>&gt; &gt; for example if I have a simple 3D image (let say 30x30x30) is it possible<br>
&gt; &gt; for example to apply the mean filter<br>&gt; &gt; only on the region (15x15x15)?<br>&gt; &gt;<br>&gt; &gt; regards,<br>&gt; &gt; Steve<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; Faites une bonne action avec Bing Solidaire ! C'est ici !<br>
&gt; &gt; _____________________________________<br>&gt; &gt; Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>&gt; &gt;<br>&gt; &gt; Visit other Kitware open-source projects at<br>&gt; &gt; <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>
&gt; &gt;<br>&gt; &gt; Kitware offers ITK Training Courses, for more information visit:<br>&gt; &gt; <a href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a><br>
&gt; &gt;<br>&gt; &gt; Please keep messages on-topic and check the ITK FAQ at:<br>&gt; &gt; <a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>&gt; &gt;<br>&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt; &gt; <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>&gt; &gt;<br>&gt; &gt;<br>&gt; _____________________________________<br>&gt; Powered by <a href="http://www.kitware.com">www.kitware.com</a><br>
&gt; <br>&gt; Visit other Kitware open-source projects at<br>&gt; <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>&gt; <br>&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a><br>&gt; <br>&gt; Please keep messages on-topic and check the ITK FAQ at:<br>&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt; <br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a><br>&gt; <br>                                               <br>
<hr>Windows 7 : Trouvez le PC qui vous convient! <a href="http://clk.atdmt.com/FRM/go/181574577/direct/01/">Découvrez notre offre ! </a>                                               <br></div></div><div class="ecxhm"><hr>Votre messagerie et bien plus où que vous soyez. Passez à Windows Live Hotmail, c'est gratuit ! <a href="https://signup.live.com/signup.aspx?id=60969">Inscrivez-vous</a></div>
</div>
</blockquote></div><br>                                               <br /><hr />Votre messagerie et bien plus où que vous soyez. Passez à Windows Live Hotmail, c'est gratuit ! <a href='https://signup.live.com/signup.aspx?id=60969' target='_new'>Inscrivez-vous</a></body>
</html>