[Insight-users] Insight-users Digest, Vol 91, Issue 34

Arnaud Gelas arnaud_gelas at hms.harvard.edu
Thu Jan 5 02:56:58 EST 2012


Hi Hui,

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) ?

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.

Best wishes for 2012,
Arnaud

On Jan 4, 2012, at 10:37 PM, Hui Tang wrote:

> Dear all,
>
> Happy new year first of all!
>
>
> Still about Global levelset embedding image, I asked that question  
> several weeks ago.
>
> 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.........
> ////////////////////////////
>   typedef itk::LevelSetTovtkImageData< LevelSetType >  
> LevelSetConverterType;
>   typedef typename LevelSetConverterType::Pointer      
> LevelSetConverterPointer;
>    LevelSetConverterPointer m_LevelSetConverter->SetInput(const  
> LevelSetType  f );
>     typedef itk::VTKImageToImageFilter<InputImageType>  
> VTKImageToImageType;
>
>     VTKImageToImageType::Pointer vtkImageToImageFilter =  
> VTKImageToImageType::New();
>     vtkImageToImageFilter->SetInput(m_LevelSetConverter->GetOutput());
>     vtkImageToImageFilter->Update();
>
>     InputImagePointer image = InputImageType::New();
>     image->Graft(vtkImageToImageFilter->GetOutput());
> ///////////////////////////////////////////////////
> 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
>
> May I ask is it possible to do that?
>
> 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,
> I found that the Heaviside function of the global levelset embedding  
> image is calculated in:
>
>  RegionBasedLevelSetFunctionData< TInputImage, TFeatureImage  
> >::CreateHeavisideFunctionOfLevelSetImage(const InputImageType *image)
>
> 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.
> 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.
>
> Thanks a lot in advance!
> If you dfind my question unclear, please ask me, I will try to put  
> it more clear.
>
> Thanks a lot!!!! and happy new year!!!
> Best,
>
> Hui Tang
>
> On Mon, Nov 28, 2011 at 6:00 PM, <insight-users-request at itk.org>  
> wrote:
> Send Insight-users mailing list submissions to
>        insight-users at itk.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://www.itk.org/mailman/listinfo/insight-users
> or, via email, send a message with subject or body 'help' to
>        insight-users-request at itk.org
>
> You can reach the person managing the list at
>        insight-users-owner at itk.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Insight-users digest..."
>
>
> Today's Topics:
>
>   1. Re: Get global leveset image (Arnaud Gelas)
>   2. how to read DICOM tags that cannot be expressed in         
> strings (??)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 28 Nov 2011 09:17:55 +0100
> From: Arnaud Gelas <arnaud_gelas at hms.harvard.edu>
> Subject: Re: [Insight-users] Get global leveset image
> To: Hui Tang <tanghui.seu at gmail.com>
> Cc: Insight-users Users <insight-users at itk.org>
> Message-ID: <A43B0D7F-8223-4B73-B927-1F824E64D530 at hms.harvard.edu>
> Content-Type: text/plain; charset="US-ASCII"; format=flowed; delsp=yes
>
> Hi Hui,
>
> If you use the ITKLevelSetsv4 module, you may want to have a look at
> the module ITKLevelSetsv4Visualization module.
> In this module, you'd find classes and tests to display the evolution
> of a level-set interface in the 2D case, but also how to create a
> level-set image for any kind of representation.
> These classes and examples are implementing Juan's comment, but using
> the new ITK level set framework.
>
> To be able to use this code, you'd have to use the latest version
> available on the master branch using git, or wait couple of hours that
> the new release candidate tag is created.
>
> If you work with the ITKLevelSets module, you'd need to implement
> similar thing based on this framework.
>
> Best,
> Arnaud
>
> On Nov 26, 2011, at 1:17 PM, Juan Cardelino wrote:
>
> > On Fri, Nov 25, 2011 at 11:19 AM, Hui Tang - TNW <H.Tang at tudelft.nl>
> > wrote:
> >> Dear itk users,
> >>
> >> I would like to get the global levelset image ( the sighed distance
> >> image,
> >> \phi) in each levelset iteration,  does anyone have any idea on how
> >> to get
> >> that image? I am using ITK4. Thanks!!!
> >>
> >
> > Yes. You need to create an observer and attach it to the level set
> > filter. Then inside the observer class, you do something like
> > filter->GetOutput() to get the implicit function (or level set
> > function, as you wish to call it).
> > Look in the Software Guide, there are examples of this implemented.
> >
> >> Best,
> >>
> >> Hui
> >>
> >>
> >> _____________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Kitware offers ITK Training Courses, for more information visit:
> >> http://www.kitware.com/products/protraining.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
> >>
> >>
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.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
>
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 28 Nov 2011 20:33:49 +0800
> From: ?? <tongm1987 at gmail.com>
> Subject: [Insight-users] how to read DICOM tags that cannot be
>        expressed in    strings
> To: insight-users at itk.org
> Message-ID:
>        <CAJmHtskhsq7bmBU01R5hEHwqSEqYxuKC0fefGMERU=AmU=UMuQ at mail.gmail.com 
> >
> Content-Type: text/plain; charset=GB2312
>
> hi, all:
>
> Any one has experience using ITK to read ECG
>
> curveData from DICOM header file?
>
>
>
> I tried the method in the ITK software guide but it turned out not
> working. I think the reason is that the tag(5000, 3000) can?t
> expressed in string.
>
> Following is my code:
>
>     typedef itk::MetaDataDictionary DictionaryType;
>
>    dicomIO = ImageIOType::New();
>
>     dicomIO->LoadPrivateTagsOn();
>
>      dicomIO->SetMaxSizeLoadEntry( 65535 );
>
>         const DictionaryType & dictionary = dicomIO- 
> >GetMetaDataDictionary();
>
>         typedef itk::MetaDataObject< std::string > MetaDataStringType;
>
>         DictionaryType::ConstIterator itr = dictionary.Begin();
>
>         DictionaryType::ConstIterator end = dictionary.End();
>
>      std::string entryId = "5000|3000";
>
>     DictionaryType::ConstIterator tagItr = dictionary.Find(entryId);
>
>    if (tagItr != end)
>
>     {
>
>   MetaDataStringType::ConstPointer entryvalue =
>
>                            dynamic_cast<const MetaDataStringType
> *>(tagItr->second.GetPointer());
>
>
>
>         if (entryvalue)
>
>         {
>
>                  std::string tagValue = entryvalue- 
> >GetMetaDataObjectValue();
>
>                            //const char * cstr = tagValue.c_str();
>
>                  std::cout<<tagValue.size()<<" "<<tagValue<<'\n';
>
>         }
>
>     }
>
> .The string returned is kind of wired and doesn't match to the number
> of samples at all.
>
>
>
> Any help will be highly appreciated.
>
>
> --
> Best Regards?
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ??
> ??????????????
> ?????
> Tong Ming
> Department of Biomedical Engineering,
> School of Medicine, Tsinghua University
> Master Candidate
> Tel:152-1095-5604
> Email:tongm1987 at gmail.com
>
>
> ------------------------------
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
> End of Insight-users Digest, Vol 91, Issue 34
> *********************************************
>
> <ATT00001.txt>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120105/162b4ab3/attachment.htm>


More information about the Insight-users mailing list