<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 </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> typedef itk::LevelSetTovtkImageData< LevelSetType > LevelSetConverterType;<br> typedef typename LevelSetConverterType::Pointer LevelSetConverterPointer;<br> LevelSetConverterPointer m_LevelSetConverter->SetInput(const LevelSetType f );<br> typedef itk::VTKImageToImageFilter<InputImageType> VTKImageToImageType;<br><br> VTKImageToImageType::Pointer vtkImageToImageFilter = VTKImageToImageType::New();<br> vtkImageToImageFilter->SetInput(m_LevelSetConverter->GetOutput());<br> vtkImageToImageFilter->Update();<br><br> InputImagePointer image = InputImageType::New();<br> image->Graft(vtkImageToImageFilter->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 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> RegionBasedLevelSetFunctionData< TInputImage, TFeatureImage >::CreateHeavisideFunctionOfLevelSetImage(const InputImageType *image)<br> <br>I guess in this case 'const InputImageType *image' should be the 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 levelset embedding image? I need it 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"><<a href="mailto:insight-users-request@itk.org">insight-users-request@itk.org</a>></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> <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> <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> <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> <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> 1. Re: Get global leveset image (Arnaud Gelas)<br> 2. how to read DICOM tags that cannot be expressed in strings (??)<br> <br> <br> ----------------------------------------------------------------------<br> <br> Message: 1<br> Date: Mon, 28 Nov 2011 09:17:55 +0100<br> From: Arnaud Gelas <<a href="mailto:arnaud_gelas@hms.harvard.edu">arnaud_gelas@hms.harvard.edu</a>><br> Subject: Re: [Insight-users] Get global leveset image<br> To: Hui Tang <<a href="mailto:tanghui.seu@gmail.com">tanghui.seu@gmail.com</a>><br> Cc: Insight-users Users <<a href="mailto:insight-users@itk.org">insight-users@itk.org</a>><br> Message-ID: <<a href="mailto:A43B0D7F-8223-4B73-B927-1F824E64D530@hms.harvard.edu">A43B0D7F-8223-4B73-B927-1F824E64D530@hms.harvard.edu</a>><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> > On Fri, Nov 25, 2011 at 11:19 AM, Hui Tang - TNW <<a href="mailto:H.Tang@tudelft.nl">H.Tang@tudelft.nl</a>><br> > wrote:<br> >> Dear itk users,<br> >><br> >> I would like to get the global levelset image ( the sighed distance<br> >> image,<br> >> \phi) in each levelset iteration, does anyone have any idea on how<br> >> to get<br> >> that image? I am using ITK4. Thanks!!!<br> >><br> ><br> > Yes. You need to create an observer and attach it to the level set<br> > filter. Then inside the observer class, you do something like<br> > filter->GetOutput() to get the implicit function (or level set<br> > function, as you wish to call it).<br> > Look in the Software Guide, there are examples of this implemented.<br> ><br> >> Best,<br> >><br> >> Hui<br> >><br> >><br> >> _____________________________________<br> >> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br> >><br> >> Visit other Kitware open-source projects at<br> >> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> >><br> >> Kitware offers ITK Training Courses, for more information visit:<br> >> <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br> >><br> >> Please keep messages on-topic and check the ITK FAQ at:<br> >> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br> >><br> >> Follow this link to subscribe/unsubscribe:<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> > _____________________________________<br> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br> ><br> > Visit other Kitware open-source projects at<br> > <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> ><br> > Kitware offers ITK Training Courses, for more information visit:<br> > <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br> ><br> > Please keep messages on-topic and check the ITK FAQ at:<br> > <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br> ><br> > Follow this link to subscribe/unsubscribe:<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> <br> ------------------------------<br> <br> Message: 2<br> Date: Mon, 28 Nov 2011 20:33:49 +0800<br> From: ?? <<a href="mailto:tongm1987@gmail.com">tongm1987@gmail.com</a>><br> Subject: [Insight-users] how to read DICOM tags that cannot be<br> expressed in strings<br> To: <a href="mailto:insight-users@itk.org">insight-users@itk.org</a><br> Message-ID:<br> <CAJmHtskhsq7bmBU01R5hEHwqSEqYxuKC0fefGMERU=AmU=<a href="mailto:UMuQ@mail.gmail.com">UMuQ@mail.gmail.com</a>><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> typedef itk::MetaDataDictionary DictionaryType;<br> <br> dicomIO = ImageIOType::New();<br> <br> dicomIO->LoadPrivateTagsOn();<br> <br> dicomIO->SetMaxSizeLoadEntry( 65535 );<br> <br> const DictionaryType & dictionary = dicomIO->GetMetaDataDictionary();<br> <br> typedef itk::MetaDataObject< std::string > MetaDataStringType;<br> <br> DictionaryType::ConstIterator itr = dictionary.Begin();<br> <br> DictionaryType::ConstIterator end = dictionary.End();<br> <br> std::string entryId = "5000|3000";<br> <br> DictionaryType::ConstIterator tagItr = dictionary.Find(entryId);<br> <br> if (tagItr != end)<br> <br> {<br> <br> MetaDataStringType::ConstPointer entryvalue =<br> <br> dynamic_cast<const MetaDataStringType<br> *>(tagItr->second.GetPointer());<br> <br> <br> <br> if (entryvalue)<br> <br> {<br> <br> std::string tagValue = entryvalue->GetMetaDataObjectValue();<br> <br> //const char * cstr = tagValue.c_str();<br> <br> std::cout<<tagValue.size()<<" "<<tagValue<<'\n';<br> <br> }<br> <br> }<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><ATT00001.txt></span></blockquote></div><br></div></body></html>