[Insight-users] Median: different result on different machines

Atwood, Robert C r.atwood at imperial.ac.uk
Tue Aug 23 15:22:10 EDT 2005


Luis:
 
Thanks for thinking about this 
 
A Screenshot is now at :
 
http://www.geocities.com/robertcarlatwood/
 
I originally tried attaching it (but it is'nt allowed on the list I found out... )
 
 
Both are ccmake configured as Release.I put the cmake cache on the web site too.
 
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 
 
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)
 
Machine 1 is 32 bits, ordinary Intel  Xeon from 2 years ago.
 
-- Robert
 
Compiler details: 
 
machine 1:>  gcc --version
gcc (GCC) 3.2.3 20030502 (Red Hat Linux 3.2.3-39)
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
machine 2:~> gcc --version
gcc (GCC) 3.3.3 (SuSE Linux)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 

________________________________

From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
Sent: Tue 23/08/2005 00:42
To: Atwood, Robert C
Cc: ITK Mailing List
Subject: Re: [Insight-users] Median: different result on different machines




Hi Robert

Are you using the same compilers ?
same versions of GCC ?

Do you have the same compilation options in
both machines ?

E.g. a typical explanation would be if
one machine is building for Release and
the other for Debug.

Since your images are of pixel type "float"
they are prone to computation errors.


Is  your Machine 2, a 64-bits processor ?
and your Machine 1, a 32-bits processor ?


Your description of speckly is a bit intriguing...
could you post a screenshot of the images in question
in a public web site from where we could take a look
at it ?  Hopefully together with the screenshot of
the normal appearance ?


Thanks


   Luis



-----------------------
Atwood, Robert C wrote:
> 
>
> ------------------------------------------------------------------------
> *From:* Atwood, Robert C
> *Sent:* Thu 11/08/2005 19:06
> *To:* ITK Mailing List
> *Subject:* Median: different result on different machines
>
> Dear ITK list:
> 
> I noticed different results on a new machine compared to the same code
> on the old machine, so I carefully removed all parts of my code until I
> had the minimum that exhibits the different results. It is basically
> 
> ImageFileReader ---> MedianImageFilter ---> ImageFileWriter
> 
> Machine 1:  Intel p4 2800 , RedHat enterprise WS-3 + online up2date, ITK
> from a few weeks ago cvs
> 
> Machine 2 Intel p4 3400 with em64t (x86_64) SUSE 9.1 + online Y.O.U.
> updates , ITK from today (but first I tried with the same ITK source as
> Machine 1 with the same effect.
> 
> 
> On machine 1 the median result looks correct (here it is hard-coded
> radius 3 jsut to try)
> 
> On machine 2 there is speckle noise that seems to appear as a result of
> the median.
> 
> Running the test program that was compiled on machine 1, on machine 2,
> does not give the speckles. I got rid of my slice print output routine
> in case that was causing it, and used an independant volume viewer to
> look at the volume, it is definintely speckly!
> 
> I hope this is a simple problem  that someone already knows the answer
> for , and can share it with me. Otherwise, I can provide any additional
> details that will be useful to diagnose the problem. It would be nice if
> it worked on the new machine because it is considerably faster.
> 
> Thanks
> Robert
> 
> 
> (here's the code)
> 
> 
> #include <stdio.h>
> #include <string.h>
> #include <malloc.h>
> #include "itkImage.h"
> #include "itkImageFileWriter.h"
> #include "itkImageFileReader.h"
> #include "itkMedianImageFilter.h"
>   typedef float PixelType;
>   typedef itk::Image< PixelType, 3 > ScalarImageType;
>   // definitions for writing the image
>   typedef itk::ImageFileWriter< ScalarImageType > WriterType;
>   typedef itk::ImageFileReader<ScalarImageType> ReaderType;
>   //median filter
>   typedef itk::MedianImageFilter<ScalarImageType,ScalarImageType> VolMedian;
> /*********************************/
> /* beginning of MAIN routine     */
> /*********************************/
> int main(int argc, char ** argv) {
>   int med_rad=3;
>   /* ITK objects needed for processing the volume  */
>   VolMedian::Pointer volmedian = VolMedian::New();
>   ReaderType::Pointer reader = ReaderType::New();
>   WriterType::Pointer writer = WriterType::New();
>   ScalarImageType::SizeType vol_rad;
>   if (argc != 2){
>       printf("Little program to test itk median filter\n");
>       printf("Usage: %s input.mhd\n",argv[0]);
>       printf("Only itk registered data file types to avoid extra\n");
>       printf("import filter code.\n");
>       printf("Median radius fixed at %i\n",med_rad);
>       return(0);
>   }
>   vol_rad[0] = med_rad;
>   vol_rad[1] = med_rad;
>   vol_rad[2] = med_rad;
>   volmedian->SetRadius(vol_rad);
>   printf("...3d Median ... itk radius %i ..\n",med_rad);
>   volmedian->SetInput(reader->GetOutput());
>      /* add the volume writer */
>   writer->SetInput(volmedian->GetOutput());
>   writer->SetFileName( "mediantest.mhd" );
>   reader->SetFileName(argv[1]);
>   try {
>      writer->Update();
>   }catch( itk::ExceptionObject & exp ) {
>      std::cerr << "Exception caught 04 writer update !" << std::endl;
>      std::cerr << exp << std::endl;
>   }
>   printf("All done\n");
>   return (0);
> }
> 
> 
> 
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050823/aae9d6b5/attachment-0001.html


More information about the Insight-users mailing list