<DIV>
<DIV>Hi,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I'm still triing to improve the quality of visualization of raw data. </DIV>
<DIV>&nbsp;</DIV>
<DIV>- by computing <STRONG>absolute value</STRONG> of raw data, my displayed images are too <STRONG>dark</STRONG>.</DIV>
<DIV>&nbsp;</DIV>
<DIV>- by applliing&nbsp;a <STRONG>log scaling</STRONG> after abs(), my displayed data are now too <STRONG>bright</STRONG>. That's the reason why:</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; after having taken a look on <STRONG>LogImageFilter</STRONG> and <STRONG>LogImageAdaptor</STRONG>, it seems that <STRONG>the case where input data = 0</STRONG> is not dealed with:&nbsp;log(x=0) returns a very big negative value equivalent to -infinite. So, when I applied a&nbsp;linear <STRONG>rescaling</STRONG> between&nbsp;0 and 255, my rescaled data is in [-infinite, alpha].&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Here is why I did:</DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG>absFilter-&gt;SetInput( imageInitiale );</STRONG></DIV>
<DIV><STRONG>logFilter-&gt;SetInput( absFilter-&gt;GetOutput() );<BR>rescaleFilter-&gt;SetInput( logFilter-&gt;GetOutput()) ;</STRONG></DIV>
<P><STRONG></STRONG>&nbsp;</P>
<P>So I'm triing to implement my own <STRONG>logImageAdaptor</STRONG> to deal with the case where my input data is null.</P>
<P>class LogPixelAccessor<BR>{<BR>public:<BR>&nbsp;typedef short InternalType;<BR>&nbsp;typedef short ExternalType;</P>
<P>ExternalType Get( const InternalType &amp; input )&nbsp;const<BR>{</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return ( (input != 0) ? (ExternalType)log((double)input) : 0 );</P>
<P>}<BR>};</P>
<P>But I'm always having an error at execution that I can't solve: the debugger says error encounterd is in Set function of DefaultPixelAccessor&nbsp; class.</P>
<P>class ITK_EXPORT DefaultPixelAccessor&nbsp; <BR>{<BR>public:</P>
<P>&nbsp;/** External typedef. It defines the external aspect<BR>&nbsp;&nbsp; * that this class will exhibit. */<BR>&nbsp; typedef TType ExternalType ;</P>
<P>&nbsp; /** Internal typedef. It defines the internal real<BR>&nbsp;&nbsp; * representation of data. */<BR>&nbsp; typedef TType InternalType ;</P>
<P>&nbsp;<STRONG> /** Set the pixel. */<BR>&nbsp; inline void Set(TType &amp; output, const TType &amp; input) const<BR>&nbsp;&nbsp;&nbsp; {output = input;}</STRONG></P>
<P>--&gt; Could anybody tell me why?</P>
<P>isabelle</P>
<P><B><I>Kuba Bican &lt;kuba@smyslzivota.cz&gt;</I></B> a écrit :</P>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>Hi Isabelle,<BR><BR>logarithmic scaling can be done by these filters:<BR><BR>LogImageFilter ( <BR>http://www.itk.org/Doxygen/html/classitk_1_1LogImageFilter.html )<BR>Log10ImageFilter ( <BR>http://www.itk.org/Doxygen/html/classitk_1_1Log10ImageFilter.html )<BR><BR>and/or adaptors:<BR><BR>LogImageAdaptor ( <BR>http://www.itk.org/Doxygen/html/classitk_1_1LogImageAdaptor.html )<BR>Log10ImageAdaptor ( <BR>http://www.itk.org/Doxygen/html/classitk_1_1Log10ImageAdaptor.html )<BR><BR>Hope this will help you.<BR><BR>Regards,<BR>Jakub<BR><BR><BR><BR>Renaud Isabelle napsal(a):<BR><BR>&gt; Hi Luis,<BR>&gt; <BR>&gt; In one of your numerous posted replies, you already mentioned the use <BR>&gt; of *logarithmic scaling* to improve visualisation of images.<BR>&gt; <BR>&gt; "It is not rare to use a logarithmic intensity transformation in order <BR>&gt; to display the FFT output and still be able
 to "see" something."<BR>&gt; http://public.kitware.com/pipermail/insight-users/2004-November/011201.html<BR>&gt; <BR>&gt; This is actually what I need to do to improve the quality of my <BR>&gt; ultrasonographic image.<BR>&gt; <BR>&gt; --&gt; Could you tell me a way to perform this logarithmic scaling? Is <BR>&gt; there already a function for that, or maybe could I compute my own one <BR>&gt; if you tell me how to get access of the pixel data of my image <BR>&gt; displayed with ITK and VTK.<BR>&gt; <BR>&gt; Thanks for answer,<BR>&gt; <BR>&gt; Isabelle<BR>&gt;<BR>&gt; ------------------------------------------------------------------------<BR>&gt; *Appel audio GRATUIT partout dans le monde* avec le nouveau Yahoo! <BR>&gt; Messenger<BR>&gt; Téléchargez le ici ! <BR>&gt; <HTTP: fr.messenger.yahoo.com *http: default mail_taglines messenger
 us.rd.yahoo.com><BR>&gt;<BR>&gt;<BR>&gt;------------------------------------------------------------------------<BR>&gt;<BR>&gt;_______________________________________________<BR>&gt;Insight-users mailing list<BR>&gt;Insight-users@itk.org<BR>&gt;http://www.itk.org/mailman/listinfo/insight-users<BR>&gt; <BR>&gt;<BR></BLOCKQUOTE></DIV><p>
                <hr size=1> 
<b><font color=#FF0000>Appel audio GRATUIT</font> partout dans le monde</b> avec le nouveau Yahoo! Messenger<br> 
<a href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com">Téléchargez le ici !</a>