[Insight-users] itkScalarChanAndVeseSparseLevelSetImageFilter

Sgouritsa, Eleni esgourit at Central.UH.EDU
Fri Jun 5 13:18:57 EDT 2009


Hello Luis,
thank you very much for fixing the negative origin issue. I ll check it and let you know if I have any problems.

Right now, modifying some things (like the modification mentioned in point 3 of the previous message) I have managed to produce an output. The problem is that the output seems to be an overestimated segmentation of my data, meaning that my level set after the end of the evolution contains the whole correct segmentation and extends more around and outside the expected/correct boundary. The strange thing is that using the same modifications and the same input, the code that you had posted on insight journal produces a really really good segmentation of my data!!So I was wondering if something changed from the insight journal code to the itk code in terms of the method that can explain this difference.

Concerning the remaining problems:
a. GetLevelSet 
I dont think that there is a way to visualize the level sets during the evolution. In itkMultiphaseFiniteDifferenceImageFilter_txx in GenerateData function, after the evolution finishes, this->PostProcessOutput(); is called that defines the final level set. I tried to call this->PostProcessOutput(); before every iteration event, inside the while loop. Like that, I managed to visualize in between views of the evolution. I didnt get into details so I dont know if this is the correct way to do it.
b. The evolution stops only after using the iteration stopping condition because of the problem with RMS error.RMSChange has always huge values using itkScalarChanAndVeseSparseLevelSetImageFilter
c. SetReverseExpansionDirection
d. In the code timeStep seems always fixed 0.2 and 0.08 for Sparse and Dense respectively. Can this affect the result?
e. Using itkScalarChanAndVeseDenseLevelSetImageFilter the level set does just 2 iterations and then stops because RMSChange becomes 0



-----Original Message-----
From: Sgouritsa, Eleni 
Sent: Wed 6/3/2009 4:11 PM
To: Sgouritsa, Eleni ; Luis Ibanez
Cc: alex gouaillard; insight-users at itk.org
Subject: RE: [Insight-users] itkScalarChanAndVeseSparseLevelSetImageFilter
 
Hi, 
I have some more questions...
In edge-based level sets (for example itkGeodesicActiveContourLevelSetImageFilter), when I want to visualize the evolution procedure I use an observer. I call levelsetfilter->GetOutput() from inside the observer and I get the current level set (signed distance). Then I threshold (using 0 threshold) so as to binarize and visualize.
If I understand well, in itkScalarChanAndVeseSparseLevelSetImageFilter if I want to get the current level set inside the observer, I have to use GetLevelSet(0) (I just care for segmentation of one object) and not GetOutput. GetOutput gives only the final result after the evolution have finished, right? To get the intermediate level set I have to use GetLevelSet?
Also, in itkScalarChanAndVeseSparseLevelSetImageFilter since GetOutput returns the binary result and not the signed distance , why the output type has to be float and not unsigned char (itkScalarChanAndVeseSparseLevelSetImageFilterTest2)? 
I use GetLevelSet inside the observer and I get very wrong results in every iteration, and very different from what I get if I dont use an observer (or outside the observer after the end of the evolution). It seems that if I call GetLevelSet from the observer in between the iterations I don t get the correct output. However, if I call GetLevelSet after the evolution has finished I get the correct output.
Thank you very much for your help!

Regards,
Lena 

-----Original Message-----
From: Sgouritsa, Eleni 
Sent: Tue 6/2/2009 10:24 AM
To: Luis Ibanez
Cc: alex gouaillard; insight-users at itk.org
Subject: RE: [Insight-users] itkScalarChanAndVeseSparseLevelSetImageFilter
 
Hello,
I m sorry if my point was not clear. The problems that I am facing using this class to segment 3D data are the following:

1. My data has negative origin (for example (-100, -100, -60). Unless I do SetOrigin(0,0,0) (or I guess any origin >=0) my program crashes. I have to set my negative origin as zero for my program to run. Does the class assumes positive origin of the input image?

2. I initialize my level set inside (so the evolution should be outwards). In this case I can not make my level set expand (it can just shrink, or not move). I think I should use something like SetReverseExpansionDirection to control the propagation direction, but I can not find this option in the class public members. (This is currently my main problem where I am stuck, any help would be very useful!)

3. The maximum RMS Error serves (along with the number of iterations) as a stopping criteria inside the Halt function (of itkMultiphaseFiniteDifferenceImageFilter.txx file).
Lets say I set maximum RMS Error = 0.01.
The Halt function returns the following:
return ( (this->GetElapsedIterations() >= this->m_NumberOfIterations) ||
      ( this->GetMaximumRMSError() >= m_RMSChange ) );
While the Halt function returns false the evolution continues.
However, in iteration 0, I get m_RMSChange = 0, so the evolution always stops doing 0 iterations (since the condition this->GetMaximumRMSError() >= m_RMSChange becomes true)
If I modify the Halt function to returm the following:
if(this->GetElapsedIterations()==0)
	return false;
else
	return ( (this->GetElapsedIterations() >= this->m_NumberOfIterations) || ( this->GetMaximumRMSError() >= m_RMSChange ) );
then it works.
The other problem is that RMSChange in the next iterations (1,2,3...) has very big values (like 5000) even near convergence. So the only way to stop the evolution is through the iterations number.

I am still investigating the class and I am not absolutely sure about the points mentioned but I would like to share with you for more advice.


Thank you very much,
Lena

 


-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
Sent: Mon 6/1/2009 8:39 PM
To: Sgouritsa, Eleni 
Cc: alex gouaillard; insight-users at itk.org
Subject: Re: [Insight-users] itkScalarChanAndVeseSparseLevelSetImageFilter
 

Hi Lena,

Could you please be more specific about your problem report on
item (2) ?

Is there a chance that you can report this in a form that
we could reproduce ?


    Thanks


       Luis


-----------------------------
Sgouritsa, Eleni wrote:
> Hi,
> 
> I have two more questions.
> 1. In the insight journal code there was an option 
> SetReverseExpansionDirection to control if the expansion of the level 
> set will be inwards or outwards. How can I do it using the  
> itkScalarChanAndVeseSparseLevelSetImageFilter of 3.14 release?
> 
> 2. I still have a problem when my 3D data have negative origin.
> 
> Thanks and regards,
> Lena
> 
> -----Original Message-----
> From: Sgouritsa, Eleni
> Sent: Mon 6/1/2009 4:00 AM
> To: alex gouaillard
> Cc: insight-users at itk.org
> Subject: RE: [Insight-users] itkScalarChanAndVeseSparseLevelSetImageFilter
> 
> Hello,
> finally the second issue was my fault (I just had a problem while 
> including the header files of the review folder).
> For the first, the inconsistency is just a matter of name. The code runs 
> correctly, just the name assignement in the txx is a little misleading.
> 
> Thank you very much,
> Lena
> 
> 
> -----Original Message-----
> From: alex gouaillard [mailto:alexandre_gouaillard at hms.harvard.edu]
> Sent: Sun 5/31/2009 11:34 PM
> To: Sgouritsa, Eleni
> Cc: insight-users at itk.org
> Subject: Re: [Insight-users] itkScalarChanAndVeseSparseLevelSetImageFilter
> 
> hi eleni,
> 
> we'll take a look tomorrow.
> 
> thanks for the feedback.
> 
> alex.
> 
> On May 31, 2009, at 11:52 PM, Sgouritsa, Eleni wrote:
> 
>  > Hello,
>  > I know that the review folder of the new release (3.14) is not 
>  > stable yet but I would just like to give two comments:
>  >
>  > 1. I found an inconsistency between the template arguments of the 
>  > itkScalarChanAndVeseSparseLevelSetImageFilter.h and the 
>  > itkScalarChanAndVeseSparseLevelSetImageFilter.txx.
>  > Specifically, in the header file, the template is :
>  > template < class TInputImage, class TFeatureImage, class 
>  > TOutputImage, class TFunction,
>  >   class TSharedData, typename TIdCell = unsigned int >
>  > whereas in the txx it is:
>  > template < class TInput, class TFeature, class TFunction,
>  > class TOutputPixel, class TSharedData, typename TIdCell >
>  > There is a change in the order of the 3rd and 4th argument.
>  >
>  > 2. I can not find this class 
>  > (itkScalarChanAndVeseSparseLevelSetImageFilter)  incuded in the 
>  > CMakeLists of the review folder
>  >
>  > Regards,
>  > Lena
>  >
>  > <ATT00001.txt>
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _____________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090605/66737ca5/attachment.htm>


More information about the Insight-users mailing list