<DIV>
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I'm still triing to improve the quality of visualization of raw data. </DIV>
<DIV> </DIV>
<DIV>- by computing <STRONG>absolute value</STRONG> of raw data, my displayed images are too <STRONG>dark</STRONG>.</DIV>
<DIV> </DIV>
<DIV>- by applliing a <STRONG>log scaling</STRONG> after abs(), my displayed data are now too <STRONG>bright</STRONG>. That's the reason why:</DIV>
<DIV> 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: log(x=0) returns a very big negative value equivalent to -infinite. So, when I applied a linear <STRONG>rescaling</STRONG> between 0 and 255, my rescaled data is in [-infinite, alpha]. </DIV>
<DIV> </DIV>
<DIV>Here is why I did:</DIV>
<DIV> </DIV>
<DIV><STRONG>absFilter->SetInput( imageInitiale );</STRONG></DIV>
<DIV><STRONG>logFilter->SetInput( absFilter->GetOutput() );<BR>rescaleFilter->SetInput( logFilter->GetOutput()) ;</STRONG></DIV>
<P><STRONG></STRONG> </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> typedef short InternalType;<BR> typedef short ExternalType;</P>
<P>ExternalType Get( const InternalType & input ) const<BR>{</P>
<P> 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 class.</P>
<P>class ITK_EXPORT DefaultPixelAccessor <BR>{<BR>public:</P>
<P> /** External typedef. It defines the external aspect<BR> * that this class will exhibit. */<BR> typedef TType ExternalType ;</P>
<P> /** Internal typedef. It defines the internal real<BR> * representation of data. */<BR> typedef TType InternalType ;</P>
<P> <STRONG> /** Set the pixel. */<BR> inline void Set(TType & output, const TType & input) const<BR> {output = input;}</STRONG></P>
<P>--> Could anybody tell me why?</P>
<P>isabelle</P>
<P><B><I>Kuba Bican <kuba@smyslzivota.cz></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>> Hi Luis,<BR>> <BR>> In one of your numerous posted replies, you already mentioned the use <BR>> of *logarithmic scaling* to improve visualisation of images.<BR>> <BR>> "It is not rare to use a logarithmic intensity transformation in order <BR>> to display the FFT output and still be able
to "see" something."<BR>> http://public.kitware.com/pipermail/insight-users/2004-November/011201.html<BR>> <BR>> This is actually what I need to do to improve the quality of my <BR>> ultrasonographic image.<BR>> <BR>> --> Could you tell me a way to perform this logarithmic scaling? Is <BR>> there already a function for that, or maybe could I compute my own one <BR>> if you tell me how to get access of the pixel data of my image <BR>> displayed with ITK and VTK.<BR>> <BR>> Thanks for answer,<BR>> <BR>> Isabelle<BR>><BR>> ------------------------------------------------------------------------<BR>> *Appel audio GRATUIT partout dans le monde* avec le nouveau Yahoo! <BR>> Messenger<BR>> Téléchargez le ici ! <BR>> <HTTP: fr.messenger.yahoo.com *http: default mail_taglines messenger
us.rd.yahoo.com><BR>><BR>><BR>>------------------------------------------------------------------------<BR>><BR>>_______________________________________________<BR>>Insight-users mailing list<BR>>Insight-users@itk.org<BR>>http://www.itk.org/mailman/listinfo/insight-users<BR>> <BR>><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>