<br>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<unsigned char> RGBPixelType;<br>
typedef itk::Image<RGBPixelType, 2> RGBImageType;<br> typedef itk::Vector<float, 3> VectorPixelType;<br> typedef itk::Image<VectorPixelType, 2> VectorImageType;<br> typedef itk::Image<unsigned long, 2> LabeledImageType;<br>
typedef itk::Image<float, 2> ScalarImageType;<br><br> to<br><br> typedef itk::RGBPixel<unsigned char> RGBPixelType;<br> typedef itk::Image<RGBPixelType, 3> RGBImageType;<br> typedef itk::Vector<float, 3> VectorPixelType;<br>
typedef itk::Image<VectorPixelType, 3> VectorImageType;<br> typedef itk::Image<unsigned long, 3> LabeledImageType;<br> typedef itk::Image<float, 3> ScalarImageType;<br><br><br> and refine the value of the smoothing filter in line 146 <br>
from the current:<br><br> diffusion->SetTimeStep(0.125); <br><br> to the value<br><br> diffusion->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><div class="title"> "ManagedITK: .NET Wrappers for ITK"</div>
<div class="authors"> Mueller D.</div>
<div class="institution"> Queensland University of Technology (QUT)</div>
<a href="http://www.insight-journal.org/browse/publication/151">http://www.insight-journal.org/browse/publication/151</a><br> <a href="http://hdl.handle.net/1926/501">http://hdl.handle.net/1926/501</a><br><br><br>
<br> Regards,<br><br><br> Luis<br><br><br>----------------------------------------------------------------<br><div class="gmail_quote">On Thu, Apr 22, 2010 at 10:41 AM, Carl Bateman <span dir="ltr"><<a href="mailto:Carl.Bateman@icr.ac.uk">Carl.Bateman@icr.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I continue to convert the c++ examples, I'm now at WatershedSegmentation1.cxx.<br>
<br>
Is it possible to extend this method to work in 3d?<br>
And is it possible to convert it to c#?<br>
<br>
I'm having problems converting the following chain of typedefs:<br>
typedef itk::Vector<float, 3> VectorPixelType;<br>
typedef itk::Image<VectorPixelType, 2> VectorImageType;<br>
typedef itk::VectorCastImageFilter<RGBImageType, VectorImageType> CastFilterType;<br>
typedef itk::VectorGradientAnisotropicDiffusionImageFilter<VectorImageType, VectorImageType> DiffusionFilterType;<br>
<br>
Any help much appreciated.<br>
<br>
Regards,<br>
<br>
Carl Bateman<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>
_____________________________________<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>
</blockquote></div><br>