<br>Hi Carl,<br><br>That what the paper on ManagedITK will describe for you.<br><br>Have you read the paper ?<br><br><br>     Regards,<br><br><br>             Luis<br><br><br>-----------------------------------------------------------------------------<br>
<div class="gmail_quote">On Thu, Apr 22, 2010 at 11:47 AM, Carl Bateman <span dir="ltr">&lt;<a href="mailto:Carl.Bateman@icr.ac.uk">Carl.Bateman@icr.ac.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Luis,<br>
<br>
ah yes, but how do I convert it to C#?<br>
<br>
TIA<br>
<br>
Carl<br>
<br>
&gt;&gt;&gt; Luis Ibanez &lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt; 22/04/2010 16:02 &gt;&gt;&gt;<br>
<div><div></div><div class="h5">Hi Carl,<br>
<br>
<br>
1) Yes, the WatershedSegmentation  example<br>
    should work in N-Dimensions.<br>
<br>
    You only need to change lines 95-100 from<br>
<br>
  typedef itk::RGBPixel&lt;unsigned char&gt;   RGBPixelType;<br>
  typedef itk::Image&lt;RGBPixelType, 2&gt;    RGBImageType;<br>
  typedef itk::Vector&lt;float, 3&gt;          VectorPixelType;<br>
  typedef itk::Image&lt;VectorPixelType, 2&gt; VectorImageType;<br>
  typedef itk::Image&lt;unsigned long, 2&gt;   LabeledImageType;<br>
  typedef itk::Image&lt;float, 2&gt;           ScalarImageType;<br>
<br>
   to<br>
<br>
  typedef itk::RGBPixel&lt;unsigned char&gt;   RGBPixelType;<br>
  typedef itk::Image&lt;RGBPixelType, 3&gt;    RGBImageType;<br>
  typedef itk::Vector&lt;float, 3&gt;          VectorPixelType;<br>
  typedef itk::Image&lt;VectorPixelType, 3&gt; VectorImageType;<br>
  typedef itk::Image&lt;unsigned long, 3&gt;   LabeledImageType;<br>
  typedef itk::Image&lt;float, 3&gt;           ScalarImageType;<br>
<br>
<br>
   and refine the value of the smoothing filter in line 146<br>
   from the current:<br>
<br>
               diffusion-&gt;SetTimeStep(0.125);<br>
<br>
   to the value<br>
<br>
             diffusion-&gt;SetTimeStep(0.0625);<br>
<br>
    that should do the trick.<br>
<br>
<br>
2)  It should be possible to convert it to C#<br>
     as well...<br>
<br>
     Have you seen the following paper ?:<br>
<br>
      &quot;ManagedITK: .NET Wrappers for ITK&quot;<br>
       Mueller D.<br>
      Queensland University of Technology (QUT)<br>
     <a href="http://www.insight-journal.org/browse/publication/151" target="_blank">http://www.insight-journal.org/browse/publication/151</a><br>
     <a href="http://hdl.handle.net/1926/501" target="_blank">http://hdl.handle.net/1926/501</a><br>
<br>
<br>
<br>
   Regards,<br>
<br>
<br>
        Luis<br>
<br>
<br>
----------------------------------------------------------------<br>
On Thu, Apr 22, 2010 at 10:41 AM, Carl Bateman &lt;<a href="mailto:Carl.Bateman@icr.ac.uk">Carl.Bateman@icr.ac.uk</a>&gt;wrote:<br>
<br>
&gt; I continue to convert the c++ examples, I&#39;m now at<br>
&gt; WatershedSegmentation1.cxx.<br>
&gt;<br>
&gt; Is it possible to extend this method to work in 3d?<br>
&gt; And is it possible to convert it to c#?<br>
&gt;<br>
&gt; I&#39;m having problems converting the following chain of typedefs:<br>
&gt;  typedef itk::Vector&lt;float, 3&gt;          VectorPixelType;<br>
&gt;  typedef itk::Image&lt;VectorPixelType, 2&gt; VectorImageType;<br>
&gt;  typedef itk::VectorCastImageFilter&lt;RGBImageType, VectorImageType&gt;<br>
&gt;  CastFilterType;<br>
&gt;  typedef<br>
&gt; itk::VectorGradientAnisotropicDiffusionImageFilter&lt;VectorImageType,<br>
&gt; VectorImageType&gt;  DiffusionFilterType;<br>
&gt;<br>
&gt; Any help much appreciated.<br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt; Carl Bateman<br>
&gt;<br>
&gt;<br>
&gt; The Institute of Cancer Research: Royal Cancer Hospital, a charitable<br>
&gt; Company Limited by Guarantee, Registered in England under Company No. 534147<br>
&gt; with its Registered Office at 123 Old Brompton Road, London SW7 3RP.<br>
&gt;<br>
&gt; This e-mail message is confidential and for use by the addressee only.  If<br>
&gt; the message is received by anyone other than the addressee, please return<br>
&gt; the message to the sender by replying to it and then delete the message from<br>
&gt; your computer and network.<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>
&gt;<br>
<br>
<br>
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.<br>
<br>
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.<br>

</div></div></blockquote></div><br>