<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hello again,<br><br>I open again this subject because of what Louis suggested.<br><br>&gt; or even use the SetRequrestedRegion()<br>&gt; of the Median filter directly.  <br><br>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 id="stopSpelling">From: steve.harris18@hotmail.com<br>To: imacia@vicomtech.org; luis.ibanez@kitware.com<br>Date: Tue, 26 Jan 2010 10:48:22 +0000<br>CC: insight-users@itk.org<br>Subject: Re: [Insight-users] Apply filter only on a specific region ?<br><br>



<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Verdana;}
</style>


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: imacia@vicomtech.org<br>&gt; To: luis.ibanez@kitware.com; steve.harris18@hotmail.com<br>&gt; CC: insight-users@itk.org<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: insight-users-bounces@itk.org [mailto:insight-users-bounces@itk.org] 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: insight-users@itk.org<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;steve.harris18@hotmail.com&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 www.kitware.com<br>&gt; &gt;<br>&gt; &gt; Visit other Kitware open-source projects at<br>&gt; &gt; http://www.kitware.com/opensource/opensource.html<br>&gt; &gt;<br>&gt; &gt; Kitware offers ITK Training Courses, for more information visit:<br>&gt; &gt; http://www.kitware.com/products/protraining.html<br>&gt; &gt;<br>&gt; &gt; Please keep messages on-topic and check the ITK FAQ at:<br>&gt; &gt; http://www.itk.org/Wiki/ITK_FAQ<br>&gt; &gt;<br>&gt; &gt; Follow this link to subscribe/unsubscribe:<br>&gt; &gt; http://www.itk.org/mailman/listinfo/insight-users<br>&gt; &gt;<br>&gt; &gt;<br>&gt; _____________________________________<br>&gt; Powered by www.kitware.com<br>&gt; <br>&gt; Visit other Kitware open-source projects at<br>&gt; http://www.kitware.com/opensource/opensource.html<br>&gt; <br>&gt; Kitware offers ITK Training Courses, for more information visit:<br>&gt; http://www.kitware.com/products/protraining.html<br>&gt; <br>&gt; Please keep messages on-topic and check the ITK FAQ at:<br>&gt; http://www.itk.org/Wiki/ITK_FAQ<br>&gt; <br>&gt; Follow this link to subscribe/unsubscribe:<br>&gt; http://www.itk.org/mailman/listinfo/insight-users<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 /><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>