<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>Re: [Insight-users] Median: different result on different machines</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText65746 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Luis:</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>Thanks for thinking about
this </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>A Screenshot is now at :</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><A
href="http://www.geocities.com/robertcarlatwood/">http://www.geocities.com/robertcarlatwood/</A></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>I originally tried attaching it (but it is'nt allowed on the list I
found out... )</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Both are ccmake configured as Release.I put the cmake cache on the
web site too.</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Of course, the compilers are different as they are differeint Linux
distributions. Also the minor release is different, but I have no idea what
backpatches each distribution has incorporated; I note that Red-hat's extra
version number is 39 implying quite a few changes from the base 3-2-3 </DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Yes, Machine 2 is '64 bits' or 'em64t' according to
Intel (I don't think it is 'true' 64 bit like Itanium.. similar to
AMD64, but Intel)</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>Machine 1 is 32 bits, ordinary Intel Xeon from 2 years
ago.</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>-- Robert</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>Compiler details: </FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>machine 1:> gcc
--version<BR>gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-39)<BR>Copyright (C)
2002 Free Software Foundation, Inc.<BR>This is free software; see the source for
copying conditions. There is NO<BR>warranty; not even for MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2>machine 2</FONT><FONT face=Arial
color=#000000 size=2>:~> gcc --version<BR>gcc (GCC) 3.3.3 (SuSE
Linux)<BR>Copyright (C) 2003 Free Software Foundation, Inc.<BR>This is free
software; see the source for copying conditions. There is NO<BR>warranty;
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT> </DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Luis Ibanez
[mailto:luis.ibanez@kitware.com]<BR><B>Sent:</B> Tue 23/08/2005
00:42<BR><B>To:</B> Atwood, Robert C<BR><B>Cc:</B> ITK Mailing
List<BR><B>Subject:</B> Re: [Insight-users] Median: different result on
different machines<BR></FONT><BR></DIV>
<DIV><BR>
<P><FONT size=2>Hi Robert<BR><BR>Are you using the same compilers ?<BR>same
versions of GCC ?<BR><BR>Do you have the same compilation options in<BR>both
machines ?<BR><BR>E.g. a typical explanation would be if<BR>one machine is
building for Release and<BR>the other for Debug.<BR><BR>Since your images are of
pixel type "float"<BR>they are prone to computation errors.<BR><BR><BR>Is
your Machine 2, a 64-bits processor ?<BR>and your Machine 1, a 32-bits processor
?<BR><BR><BR>Your description of speckly is a bit intriguing...<BR>could you
post a screenshot of the images in question<BR>in a public web site from where
we could take a look<BR>at it ? Hopefully together with the screenshot
of<BR>the normal appearance ?<BR><BR><BR>Thanks<BR><BR><BR>
Luis<BR><BR><BR><BR>-----------------------<BR>Atwood, Robert C
wrote:<BR>> <BR>><BR>>
------------------------------------------------------------------------<BR>>
*From:* Atwood, Robert C<BR>> *Sent:* Thu 11/08/2005 19:06<BR>> *To:* ITK
Mailing List<BR>> *Subject:* Median: different result on different
machines<BR>><BR>> Dear ITK list:<BR>> <BR>> I noticed
different results on a new machine compared to the same code<BR>> on the old
machine, so I carefully removed all parts of my code until I<BR>> had the
minimum that exhibits the different results. It is
basically<BR>> <BR>> ImageFileReader ---> MedianImageFilter
---> ImageFileWriter<BR>> <BR>> Machine 1: Intel p4 2800 ,
RedHat enterprise WS-3 + online up2date, ITK<BR>> from a few weeks ago
cvs<BR>> <BR>> Machine 2 Intel p4 3400 with em64t (x86_64) SUSE 9.1 +
online Y.O.U.<BR>> updates , ITK from today (but first I tried with the same
ITK source as<BR>> Machine 1 with the same
effect.<BR>> <BR>> <BR>> On machine 1 the median result looks
correct (here it is hard-coded<BR>> radius 3 jsut to
try)<BR>> <BR>> On machine 2 there is speckle noise that seems to
appear as a result of<BR>> the median.<BR>> <BR>> Running the test
program that was compiled on machine 1, on machine 2,<BR>> does not give the
speckles. I got rid of my slice print output routine<BR>> in case that was
causing it, and used an independant volume viewer to<BR>> look at the volume,
it is definintely speckly!<BR>> <BR>> I hope this is a simple
problem that someone already knows the answer<BR>> for , and can share
it with me. Otherwise, I can provide any additional<BR>> details that will be
useful to diagnose the problem. It would be nice if<BR>> it worked on the new
machine because it is considerably faster.<BR>> <BR>> Thanks<BR>>
Robert<BR>> <BR>> <BR>> (here's the
code)<BR>> <BR>> <BR>> #include <stdio.h><BR>>
#include <string.h><BR>> #include <malloc.h><BR>> #include
"itkImage.h"<BR>> #include "itkImageFileWriter.h"<BR>> #include
"itkImageFileReader.h"<BR>> #include
"itkMedianImageFilter.h"<BR>> typedef float
PixelType;<BR>> typedef itk::Image< PixelType, 3 >
ScalarImageType;<BR>> // definitions for writing the
image<BR>> typedef itk::ImageFileWriter< ScalarImageType >
WriterType;<BR>> typedef
itk::ImageFileReader<ScalarImageType> ReaderType;<BR>>
//median filter<BR>> typedef
itk::MedianImageFilter<ScalarImageType,ScalarImageType> VolMedian;<BR>>
/*********************************/<BR>> /* beginning of MAIN
routine */<BR>>
/*********************************/<BR>> int main(int argc, char ** argv)
{<BR>> int med_rad=3;<BR>> /* ITK objects needed
for processing the volume */<BR>> VolMedian::Pointer
volmedian = VolMedian::New();<BR>> ReaderType::Pointer reader =
ReaderType::New();<BR>> WriterType::Pointer writer =
WriterType::New();<BR>> ScalarImageType::SizeType
vol_rad;<BR>> if (argc !=
2){<BR>> printf("Little program to test
itk median filter\n");<BR>>
printf("Usage: %s
input.mhd\n",argv[0]);<BR>> printf("Only
itk registered data file types to avoid
extra\n");<BR>> printf("import filter
code.\n");<BR>> printf("Median radius
fixed at %i\n",med_rad);<BR>>
return(0);<BR>> }<BR>> vol_rad[0] =
med_rad;<BR>> vol_rad[1] = med_rad;<BR>>
vol_rad[2] = med_rad;<BR>>
volmedian->SetRadius(vol_rad);<BR>> printf("...3d Median ...
itk radius %i ..\n",med_rad);<BR>>
volmedian->SetInput(reader->GetOutput());<BR>>
/* add the volume writer */<BR>>
writer->SetInput(volmedian->GetOutput());<BR>>
writer->SetFileName( "mediantest.mhd" );<BR>>
reader->SetFileName(argv[1]);<BR>> try
{<BR>> writer->Update();<BR>>
}catch( itk::ExceptionObject & exp ) {<BR>>
std::cerr << "Exception caught 04 writer update !" <<
std::endl;<BR>> std::cerr << exp <<
std::endl;<BR>> }<BR>> printf("All
done\n");<BR>> return (0);<BR>>
}<BR>> <BR>> <BR>> <BR>><BR>><BR>>
------------------------------------------------------------------------<BR>><BR>>
_______________________________________________<BR>> Insight-users mailing
list<BR>> Insight-users@itk.org<BR>> <A
href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</A><BR><BR></FONT></P></DIV>
</BODY>
</HTML>