<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Hui,<div><br></div><div>Do you want to access mean values from the internal and external term at each iteration (while rendering the level set function or level set interface) ?</div><div><br></div><div>Just a comment with respect to your second point. It is definitively possible and really easy to combine internal and external term into a single one. If that helps, you could create such a term and contribute it to the community.</div><div><br></div><div>Best wishes for 2012,</div><div>Arnaud&nbsp;</div><div><br><div><div>On Jan 4, 2012, at 10:37 PM, Hui Tang wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Dear all,<br><br>Happy new year first of all!<br><br><br>Still about Global levelset embedding image, I asked that question several weeks ago.<br><br>1)Last time, Arnaud kindly pointed me out how to get global levelset embedding image in ITKLevelSetsv4, I did it by first attach levelsetType to levelsetToVTKImageData and then used VTKImageToImage to get the levelset image.........<br> ////////////////////////////<br>&nbsp; typedef itk::LevelSetTovtkImageData&lt; LevelSetType &gt; LevelSetConverterType;<br>&nbsp; typedef typename LevelSetConverterType::Pointer&nbsp;&nbsp;&nbsp;&nbsp; LevelSetConverterPointer;<br>&nbsp;&nbsp; LevelSetConverterPointer m_LevelSetConverter-&gt;SetInput(const LevelSetType&nbsp; f );<br> &nbsp;&nbsp;&nbsp; typedef itk::VTKImageToImageFilter&lt;InputImageType&gt; VTKImageToImageType;<br><br>&nbsp;&nbsp;&nbsp; VTKImageToImageType::Pointer vtkImageToImageFilter = VTKImageToImageType::New();<br>&nbsp;&nbsp;&nbsp; vtkImageToImageFilter-&gt;SetInput(m_LevelSetConverter-&gt;GetOutput());<br> &nbsp;&nbsp;&nbsp; vtkImageToImageFilter-&gt;Update();<br><br>&nbsp;&nbsp;&nbsp; InputImagePointer image = InputImageType::New();<br>&nbsp;&nbsp;&nbsp; image-&gt;Graft(vtkImageToImageFilter-&gt;GetOutput());<br>///////////////////////////////////////////////////<br> But then I found out that I need to get the mean value in " internal equation (external equation)" in "external equation (internal equation)" during each levelset iteration , but the ChanandVese internal and external equation terms are in different classes  ITKLevelSetsV4, i.e. itkLevelSetEquationChanAndVeseInternalTerm.h&nbsp; and itkLevelSetEquationChanAndVeseExternalTerm.h<br> <br>May I ask is it possible to do that?<br><br>2)If it is not possible, I would like to use  ITKLevelSets, because in ITKLevelSets, the internal and external terms are not in separate classes, But then I found it difficult to get the global levelset embedding image,<br> I found that the Heaviside function of  the global levelset embedding image is calculated in:<br><br>&nbsp;RegionBasedLevelSetFunctionData&lt; TInputImage, TFeatureImage &gt;::CreateHeavisideFunctionOfLevelSetImage(const InputImageType *image)<br> <br>I guess in this case 'const InputImageType *image' should be the&nbsp; levelset embedding image, if I find out where this function is used, I can also find 'const InputImageType *image'', but I did not find it so far. <br> May I ask again where can I find the global &nbsp; levelset embedding image? I need it&nbsp; inside itkScalarChanandVeseLevelSetImageFunction.h or any other levelset function classes, geodesic active contour. <br><br>Thanks a lot in advance!<br> If you dfind my question unclear, please ask me, I will try to put it more clear.<br><br>Thanks a lot!!!! and happy new year!!!<br>Best,<br><br>Hui Tang<br><br>On Mon, Nov 28, 2011 at 6:00 PM,  <span dir="ltr">&lt;<a href="mailto:insight-users-request@itk.org">insight-users-request@itk.org</a>&gt;</span> wrote:<br> <div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send Insight-users mailing list submissions to<br> &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br> <br> To subscribe or unsubscribe via the World Wide Web, visit<br> &nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br> or, via email, send a message with subject or body 'help' to<br> &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:insight-users-request@itk.org">insight-users-request@itk.org</a><br> <br> You can reach the person managing the list at<br> &nbsp; &nbsp; &nbsp; &nbsp;<a href="mailto:insight-users-owner@itk.org">insight-users-owner@itk.org</a><br> <br> When replying, please edit your Subject line so it is more specific<br> than "Re: Contents of Insight-users digest..."<br> <br> <br> Today's Topics:<br> <br> &nbsp; 1. Re: Get global leveset image (Arnaud Gelas)<br> &nbsp; 2. how to read DICOM tags that cannot be expressed in &nbsp; &nbsp; &nbsp; &nbsp;strings (??)<br> <br> <br> ----------------------------------------------------------------------<br> <br> Message: 1<br> Date: Mon, 28 Nov 2011 09:17:55 +0100<br> From: Arnaud Gelas &lt;<a href="mailto:arnaud_gelas@hms.harvard.edu">arnaud_gelas@hms.harvard.edu</a>&gt;<br> Subject: Re: [Insight-users] Get global leveset image<br> To: Hui Tang &lt;<a href="mailto:tanghui.seu@gmail.com">tanghui.seu@gmail.com</a>&gt;<br> Cc: Insight-users Users &lt;<a href="mailto:insight-users@itk.org">insight-users@itk.org</a>&gt;<br> Message-ID: &lt;<a href="mailto:A43B0D7F-8223-4B73-B927-1F824E64D530@hms.harvard.edu">A43B0D7F-8223-4B73-B927-1F824E64D530@hms.harvard.edu</a>&gt;<br> Content-Type: text/plain; charset="US-ASCII"; format=flowed; delsp=yes<br> <br> Hi Hui,<br> <br> If you use the ITKLevelSetsv4 module, you may want to have a look at<br> the module ITKLevelSetsv4Visualization module.<br> In this module, you'd find classes and tests to display the evolution<br> of a level-set interface in the 2D case, but also how to create a<br> level-set image for any kind of representation.<br> These classes and examples are implementing Juan's comment, but using<br> the new ITK level set framework.<br> <br> To be able to use this code, you'd have to use the latest version<br> available on the master branch using git, or wait couple of hours that<br> the new release candidate tag is created.<br> <br> If you work with the ITKLevelSets module, you'd need to implement<br> similar thing based on this framework.<br> <br> Best,<br> Arnaud<br> <br> On Nov 26, 2011, at 1:17 PM, Juan Cardelino wrote:<br> <br> &gt; On Fri, Nov 25, 2011 at 11:19 AM, Hui Tang - TNW &lt;<a href="mailto:H.Tang@tudelft.nl">H.Tang@tudelft.nl</a>&gt;<br> &gt; wrote:<br> &gt;&gt; Dear itk users,<br> &gt;&gt;<br> &gt;&gt; I would like to get the global levelset image ( the sighed distance<br> &gt;&gt; image,<br> &gt;&gt; \phi) in each levelset iteration, &nbsp;does anyone have any idea on how<br> &gt;&gt; to get<br> &gt;&gt; that image? I am using ITK4. Thanks!!!<br> &gt;&gt;<br> &gt;<br> &gt; Yes. You need to create an observer and attach it to the level set<br> &gt; filter. Then inside the observer class, you do something like<br> &gt; filter-&gt;GetOutput() to get the implicit function (or level set<br> &gt; function, as you wish to call it).<br> &gt; Look in the Software Guide, there are examples of this implemented.<br> &gt;<br> &gt;&gt; Best,<br> &gt;&gt;<br> &gt;&gt; Hui<br> &gt;&gt;<br> &gt;&gt;<br> &gt;&gt; _____________________________________<br> &gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br> &gt;&gt;<br> &gt;&gt; Visit other Kitware open-source projects at<br> &gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> &gt;&gt;<br> &gt;&gt; Kitware offers ITK Training Courses, for more information visit:<br> &gt;&gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br> &gt;&gt;<br> &gt;&gt; Please keep messages on-topic and check the ITK FAQ at:<br> &gt;&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br> &gt;&gt;<br> &gt;&gt; Follow this link to subscribe/unsubscribe:<br> &gt;&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br> &gt;&gt;<br> &gt;&gt;<br> &gt; _____________________________________<br> &gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br> &gt;<br> &gt; Visit other Kitware open-source projects at<br> &gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> &gt;<br> &gt; Kitware offers ITK Training Courses, for more information visit:<br> &gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br> &gt;<br> &gt; Please keep messages on-topic and check the ITK FAQ at:<br> &gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br> &gt;<br> &gt; Follow this link to subscribe/unsubscribe:<br> &gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br> <br> <br> <br> ------------------------------<br> <br> Message: 2<br> Date: Mon, 28 Nov 2011 20:33:49 +0800<br> From: ?? &lt;<a href="mailto:tongm1987@gmail.com">tongm1987@gmail.com</a>&gt;<br> Subject: [Insight-users] how to read DICOM tags that cannot be<br> &nbsp; &nbsp; &nbsp; &nbsp;expressed in &nbsp; &nbsp;strings<br> To: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br> Message-ID:<br> &nbsp; &nbsp; &nbsp; &nbsp;&lt;CAJmHtskhsq7bmBU01R5hEHwqSEqYxuKC0fefGMERU=AmU=<a href="mailto:UMuQ@mail.gmail.com">UMuQ@mail.gmail.com</a>&gt;<br> Content-Type: text/plain; charset=GB2312<br> <br> hi, all:<br> <br> Any one has experience using ITK to read ECG<br> <br> curveData from DICOM header file?<br> <br> <br> <br> I tried the method in the ITK software guide but it turned out not<br> working. I think the reason is that the tag(5000, 3000) can?t<br> expressed in string.<br> <br> Following is my code:<br> <br> &nbsp; &nbsp; typedef itk::MetaDataDictionary DictionaryType;<br> <br> &nbsp; &nbsp;dicomIO = ImageIOType::New();<br> <br> &nbsp; &nbsp; dicomIO-&gt;LoadPrivateTagsOn();<br> <br> &nbsp; &nbsp; &nbsp;dicomIO-&gt;SetMaxSizeLoadEntry( 65535 );<br> <br> &nbsp; &nbsp; &nbsp; &nbsp; const DictionaryType &amp; dictionary = dicomIO-&gt;GetMetaDataDictionary();<br> <br> &nbsp; &nbsp; &nbsp; &nbsp; typedef itk::MetaDataObject&lt; std::string &gt; MetaDataStringType;<br> <br> &nbsp; &nbsp; &nbsp; &nbsp; DictionaryType::ConstIterator itr = dictionary.Begin();<br> <br> &nbsp; &nbsp; &nbsp; &nbsp; DictionaryType::ConstIterator end = dictionary.End();<br> <br> &nbsp; &nbsp; &nbsp;std::string entryId = "5000|3000";<br> <br> &nbsp; &nbsp; DictionaryType::ConstIterator tagItr = dictionary.Find(entryId);<br> <br> &nbsp; &nbsp;if (tagItr != end)<br> <br> &nbsp; &nbsp; {<br> <br> &nbsp; MetaDataStringType::ConstPointer entryvalue =<br> <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dynamic_cast&lt;const MetaDataStringType<br> *&gt;(tagItr-&gt;second.GetPointer());<br> <br> <br> <br> &nbsp; &nbsp; &nbsp; &nbsp; if (entryvalue)<br> <br> &nbsp; &nbsp; &nbsp; &nbsp; {<br> <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;std::string tagValue = entryvalue-&gt;GetMetaDataObjectValue();<br> <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//const char * cstr = tagValue.c_str();<br> <br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;std::cout&lt;&lt;tagValue.size()&lt;&lt;" "&lt;&lt;tagValue&lt;&lt;'\n';<br> <br> &nbsp; &nbsp; &nbsp; &nbsp; }<br> <br> &nbsp; &nbsp; }<br> <br> .The string returned is kind of wired and doesn't match to the number<br> of samples at all.<br> <br> <br> <br> Any help will be highly appreciated.<br> <br> <br> --<br> Best Regards?<br> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br> ??<br> ??????????????<br> ?????<br> Tong Ming<br> Department of Biomedical Engineering,<br> School of Medicine, Tsinghua University<br> Master Candidate<br> Tel:152-1095-5604<br> <a href="mailto:Email%3Atongm1987@gmail.com">Email:tongm1987@gmail.com</a><br> <br> <br> ------------------------------<br> <br> _______________________________________________<br> Insight-users mailing list<br> <a href="mailto:Insight-users@itk.org">Insight-users@itk.org</a><br> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br> <br> <br> End of Insight-users Digest, Vol 91, Issue 34<br> *********************************************<br> </blockquote></div><br> <span>&lt;ATT00001.txt&gt;</span></blockquote></div><br></div></body></html>