[Insight-users] Converting WatershedSegmentation1.cxx to c# and 3d

Luis Ibanez luis.ibanez at kitware.com
Thu Apr 22 11:49:27 EDT 2010


Hi Carl,

That what the paper on ManagedITK will describe for you.

Have you read the paper ?


     Regards,


             Luis


-----------------------------------------------------------------------------
On Thu, Apr 22, 2010 at 11:47 AM, Carl Bateman <Carl.Bateman at icr.ac.uk>wrote:

> Hi Luis,
>
> ah yes, but how do I convert it to C#?
>
> TIA
>
> Carl
>
> >>> Luis Ibanez <luis.ibanez at kitware.com> 22/04/2010 16:02 >>>
> Hi Carl,
>
>
> 1) Yes, the WatershedSegmentation  example
>    should work in N-Dimensions.
>
>    You only need to change lines 95-100 from
>
>  typedef itk::RGBPixel<unsigned char>   RGBPixelType;
>  typedef itk::Image<RGBPixelType, 2>    RGBImageType;
>  typedef itk::Vector<float, 3>          VectorPixelType;
>  typedef itk::Image<VectorPixelType, 2> VectorImageType;
>  typedef itk::Image<unsigned long, 2>   LabeledImageType;
>  typedef itk::Image<float, 2>           ScalarImageType;
>
>   to
>
>  typedef itk::RGBPixel<unsigned char>   RGBPixelType;
>  typedef itk::Image<RGBPixelType, 3>    RGBImageType;
>  typedef itk::Vector<float, 3>          VectorPixelType;
>  typedef itk::Image<VectorPixelType, 3> VectorImageType;
>  typedef itk::Image<unsigned long, 3>   LabeledImageType;
>  typedef itk::Image<float, 3>           ScalarImageType;
>
>
>   and refine the value of the smoothing filter in line 146
>   from the current:
>
>               diffusion->SetTimeStep(0.125);
>
>   to the value
>
>             diffusion->SetTimeStep(0.0625);
>
>    that should do the trick.
>
>
> 2)  It should be possible to convert it to C#
>     as well...
>
>     Have you seen the following paper ?:
>
>      "ManagedITK: .NET Wrappers for ITK"
>       Mueller D.
>      Queensland University of Technology (QUT)
>     http://www.insight-journal.org/browse/publication/151
>     http://hdl.handle.net/1926/501
>
>
>
>   Regards,
>
>
>        Luis
>
>
> ----------------------------------------------------------------
> On Thu, Apr 22, 2010 at 10:41 AM, Carl Bateman <Carl.Bateman at icr.ac.uk
> >wrote:
>
> > I continue to convert the c++ examples, I'm now at
> > WatershedSegmentation1.cxx.
> >
> > Is it possible to extend this method to work in 3d?
> > And is it possible to convert it to c#?
> >
> > I'm having problems converting the following chain of typedefs:
> >  typedef itk::Vector<float, 3>          VectorPixelType;
> >  typedef itk::Image<VectorPixelType, 2> VectorImageType;
> >  typedef itk::VectorCastImageFilter<RGBImageType, VectorImageType>
> >  CastFilterType;
> >  typedef
> > itk::VectorGradientAnisotropicDiffusionImageFilter<VectorImageType,
> > VectorImageType>  DiffusionFilterType;
> >
> > Any help much appreciated.
> >
> > Regards,
> >
> > Carl Bateman
> >
> >
> > The Institute of Cancer Research: Royal Cancer Hospital, a charitable
> > Company Limited by Guarantee, Registered in England under Company No.
> 534147
> > with its Registered Office at 123 Old Brompton Road, London SW7 3RP.
> >
> > This e-mail message is confidential and for use by the addressee only.
>  If
> > the message is received by anyone other than the addressee, please return
> > the message to the sender by replying to it and then delete the message
> from
> > your computer and network.
> > _____________________________________
> > 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
> >
>
>
> The Institute of Cancer Research: Royal Cancer Hospital, a charitable
> Company Limited by Guarantee, Registered in England under Company No. 534147
> with its Registered Office at 123 Old Brompton Road, London SW7 3RP.
>
> This e-mail message is confidential and for use by the addressee only.  If
> the message is received by anyone other than the addressee, please return
> the message to the sender by replying to it and then delete the message from
> your computer and network.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100422/53b780fc/attachment.htm>


More information about the Insight-users mailing list