[Insight-users] Inconsistent watershed behaviour?

Atwood, Robert C r.atwood at imperial.ac.uk
Fri Aug 13 15:15:07 EDT 2004


Jim:

Even more specific detail causing the result to change (position of the
comments delimiters), setting the first level as a constant seems to
have a different behaviour than setting from a variable, either float or
double.


I am not sure which is the 'right' result for the selected parameters
but Case E is the result I want to use. (so really I want the right
parameters for this result! )


Robert
 

************************ Case D gives 'oversegmented' result:

 /* initial default */
  /*********************************************************
        level = 1.0; 
        watershed->SetLevel( (double)level );
        thresh = 0.09;
        watershed->SetThreshold((double)thresh);
        printf("setting watershed level %f\n",level);
        fprintf(logfile,"setting watershed level %f\n",level);
  *************************************************************/
  watershed->SetLevel( 1.0 );
  watershed->SetThreshold( 0.09 );
  printf("Updating initial watershed ...\n");
  fprintf(logfile,"Updating initial watershed ...\n");
  try{
  watershed->Update();
  }catch(itk::ExceptionObject & exp ) {
    std::cerr << "Exception caught 001 !" << std::endl;
    std::cerr << "Exiting !" << std::endl;
    std::cerr << exp << std::endl;
    exit(0);
    /* exit, otherwise images get written anyways using the wrong output
*/
    /* causing erroneous conclusions! */
  }





***************************** Case E gives Nice result:
/* initial default */
 
        level = 1.0; 
        watershed->SetLevel( (double)level );
        thresh = 0.09;
        watershed->SetThreshold((double)thresh);
        printf("setting watershed level %f\n",level);
        fprintf(logfile,"setting watershed level %f\n",level);
 /***************************************************************
  watershed->SetLevel( 1.0 );
  watershed->SetThreshold( 0.09 );
  printf("Updating initial watershed ...\n");
  fprintf(logfile,"Updating initial watershed ...\n");
 *****************************************************************/
  try{
  watershed->Update();
  }catch(itk::ExceptionObject & exp ) {
    std::cerr << "Exception caught 001 !" << std::endl;
    std::cerr << "Exiting !" << std::endl;
    std::cerr << exp << std::endl;
    exit(0);
    /* exit, otherwise images get written anyways using the wrong output
*/
    /* causing erroneous conclusions! */
  }
******************************************


-----Original Message-----
From: Miller, James V (Research) [mailto:millerjv at crd.ge.com] 
Sent: 13 August 2004 19:33
To: Atwood, Robert C; Miller, James V (Research)
Cc: insight-users at itk.org
Subject: RE: [Insight-users] Inconsistent watershed behaviour?


Robert, 

Thanks for running the test cases.  This sounds like a bug. 

Is the smaller volume of that you are running on something that you 
can share? Otherwise, I'll try to find an image that exhibits the 
same problem.

Some further questions to help narrow the search.  What OS are running
on? Does it have more than one processor? 

The "narrow artifacts" that appear in the image that does not work is
similar to some of the segmentation problems I have had with the 
watershed.

Jim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: case_e.png
Type: image/png
Size: 3545 bytes
Desc: case_e.png
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040813/4915ba29/case_e-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: case_d.png
Type: image/png
Size: 4385 bytes
Desc: case_d.png
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040813/4915ba29/case_d-0001.png
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itk_wshd_rca_debug.cxx.gz
Type: application/x-gzip
Size: 4123 bytes
Desc: itk_wshd_rca_debug.cxx.gz
Url : http://public.kitware.com/pipermail/insight-users/attachments/20040813/4915ba29/itk_wshd_rca_debug.cxx-0001.bin


More information about the Insight-users mailing list