<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    If you save an image in some term class, it is most likely normal
    you'd see a difference between the resulting level set and the one
    you save.<br>
    Indeed term classes are accessed before the evolution, whereas the
    output is the outcome of the iteration.<br>
    <br>
    If your goal is to visualize or save the level set function
    throughout the evolution, there are existing classes for this
    purpose. These classes are in the Module LevelSetsv4Visualization
    (part of the Segmentation group).<br>
    Else, I would need some more information to help...<br>
    <br>
    <br>
    On 02/01/2012 09:53 AM, Hui Tang wrote:
    <blockquote
cite="mid:CAEz0C-7L59QOwuFPjM8t==BGK0s9ohNOwaDLNSPG8FM14TZOTw@mail.gmail.com"
      type="cite">Ha Arnaud<br>
      Thak you for your reply.<br>
      <br>
      I used sparse Whitaker<br>
      I wrote a piece of code inside itkLevelsetXXTerm<br>
      I did it via &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <br>
      &nbsp; &nbsp; &nbsp; const LevelSetOutputRealType value =static_cast&lt;
      LevelSetOutputRealType &gt;(
      this-&gt;m_CurrentLevelSetPointer-&gt;Evaluate( it.GetIndex()&nbsp; )
      );<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //LevelSetPointer levelSet =
      this-&gt;m_LevelSetContainer-&gt;GetLevelSet(
      this-&gt;m_CurrentLevelSetId );<br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; const LevelSetOutputRealType d_val1 =
      this-&gt;m_Heaviside-&gt;Evaluate( -value );<br>
      <br>
      I have an iterator "it" loop over an image "m_CurreneLevelSet"
      which is initialized.<br>
      <br>
      I did save these images........<br>
      <br>
      Best,<br>
      <br>
      Hui<br>
      <br>
      <div class="gmail_quote">On Wed, Feb 1, 2012 at 2:57 PM, Arnaud
        Gelas <span dir="ltr">&lt;<a moz-do-not-send="true"
            href="mailto:arnaudgelas@gmail.com">arnaudgelas@gmail.com</a>&gt;</span>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div bgcolor="#FFFFFF" text="#000000"> Hui,<br>
            <br>
            With all level set discrete representations (dense, sparse
            Whitaker, sparse Shi or sparse Malcolm), the level set
            function at the last iteration (after the evolution) should
            be the same as the output.<br>
            <br>
            Did you use an observer and a command to save these images?
            or did you modify some piece of code?<br>
            <br>
            Do you save your image at the end of one iteration (after
            the evolution gets done) ?<br>
            How do you evaluate the level set function?<span
              class="HOEnZb"><font color="#888888"><br>
                <br>
                Arnaud</font></span>
            <div>
              <div class="h5"><br>
                <br>
                On 02/01/2012 08:50 AM, Hui Tang wrote:
                <blockquote type="cite">ha Arnaud, thank you for reply.<br>
                  <br>
                  I am using ITK4.....embedding image is the signed
                  distance image whose zero value shows the current
                  surface.<br>
                  I runned a program that combines several itk levelset
                  terms.<br>
                  I would like to monitor the surface evolution, so I
                  saved the signed distance image in every n&nbsp; iteration.<br>
                  but I expect the last signed distance image should be
                  the same as the final segmentation, i.e. that one that
                  I got outside ITK classes using the code from ITK
                  example.<br>
                  <br>
                  Best,<br>
                  <br>
                  HUi<br>
                  <div class="gmail_quote">On Wed, Feb 1, 2012 at 2:41
                    PM, Arnaud Gelas <span dir="ltr">&lt;<a
                        moz-do-not-send="true"
                        href="mailto:arnaudgelas@gmail.com"
                        target="_blank">arnaudgelas@gmail.com</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0
                      .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000"> Hi Hui,<br>
                        <br>
                        It's not clear to me what you actually mean by
                        "embedding function" / "embedding image" ?<br>
                        This function / image are embedded with respect
                        to which class?<br>
                        What kind of level-set representation are you
                        using?<br>
                        <br>
                        Thanks,<br>
                        Arnaud
                        <div>
                          <div><br>
                            <br>
                            On 02/01/2012 08:32 AM, Hui Tang wrote: </div>
                        </div>
                        <blockquote type="cite">
                          <div>
                            <div>Dear itk users,<br>
                              <br>
                              &nbsp;I outputed my intermediate embedding
                              function every n iterations (I got it
                              inside one of the levelset terms), but&nbsp; I
                              compare that with the one&nbsp; that I got
                              after evolution&nbsp;
                              (level_set-&gt;GetLabelMap()-&gt;GetPixel(idx)
                              ), they are pretty much different.<br>
                              <br>
                              Should itk embedding image in the last
                              iteration be the same as the output
                              embedding image?<br>
                              <br>
                              Looking forward to your reply. <br>
                              <br>
                              Best, Hui<br>
                              <br>
                              <br>
                              <br>
                              <fieldset></fieldset>
                              <br>
                            </div>
                          </div>
                          <pre>_____________________________________
Powered by <a moz-do-not-send="true" href="http://www.kitware.com" target="_blank">www.kitware.com</a>

Visit other Kitware open-source projects at
<a moz-do-not-send="true" href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a>

Kitware offers ITK Training Courses, for more information visit:
<a moz-do-not-send="true" href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a>

Please keep messages on-topic and check the ITK FAQ at:
<a moz-do-not-send="true" href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a>

Follow this link to subscribe/unsubscribe:
<a moz-do-not-send="true" href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a>
</pre>
                        </blockquote>
                        <br>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </blockquote>
                <br>
              </div>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
    </blockquote>
    <br>
  </body>
</html>