<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Hi Jan,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">the code was fine, you missed to match the seed position to the value coming out of the watershed filter (imgWS) in that location. As you were feeding the output of the watershed filter to the segmentation filter, you needed to give the thresholds related to the values of that image and not the original input image (imgSeries).</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">My modification is attached. ImageJ connection did not work out of the box for me so I wrote intermediate images to disk in order to inspect them.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Regards,</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">Dženan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 27, 2015 at 4:49 PM, Jan Witowski <span dir="ltr"><<a href="mailto:jan.witowski@student.uj.edu.pl" target="_blank">jan.witowski@student.uj.edu.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Hello Dženan,</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Thanks for your assistance.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Full code of my example is located here: <a href="https://gist.github.com/jwitos/9abe7124e28ce2e31b6e" target="_blank">https://gist.github.com/jwitos/9abe7124e28ce2e31b6e</a></div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
I’ve also uploaded the DICOMs I’ve been using (30~MB, 152 .dcms inside) if you want to test them out:
<a href="http://cm-uj.pl/files/cleaned.zip" target="_blank">http://cm-uj.pl/files/cleaned.zip</a></div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Best,</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Jan</div><div><div class="h5">
<p>On 27 grudnia 2015 at 17:35:24, Dženan Zukić (<a href="mailto:dzenanz@gmail.com" target="_blank">dzenanz@gmail.com</a>) wrote:</p>
<blockquote type="cite"><span>
<div>
<div></div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Hi Jan,</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
<br>
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
that sounds like some silly simple mistake. If you provided a short compilable example with the accompanying input, somebody will probably be able to point out the problem.</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
<br>
</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Regards,</div>
<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small">
Dženan</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Dec 27, 2015 at 10:20 AM, Jan Witowski <span dir="ltr">
<<a href="mailto:jan.witowski@student.uj.edu.pl" target="_blank">jan.witowski@student.uj.edu.pl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Hello,</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
I am working with CT abdomen images and trying to segmentate the liver (liver itself, vessels and the HCC tumor). I managed to do it using OsiriX which was rather manual segmentation, and now I am working to do the same using more accurate and semi-automatic
algorithms with usage of SimpleITK. I don’t really have much experience with ITK and image manipulation which is why I ask you guys for some help.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Currently, I want to try the watershed method. I loaded my DICOM series, ran the GradientMagnitude filter and proceeded with MorphologicalWatershed (using arg Level=17, value chosen manually). I got pretty nice output image, I guess:</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<a href="http://jwitowski.com/content/images/2015/12/WSsegmentation-4469-0.jpg" target="_blank">http://jwitowski.com/content/images/2015/12/WSsegmentation-4469-0.jpg</a></div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
But now, the question is - how do I take that liver out of the image above? My best guess is, I should run a region growing segmentation.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
I tried to do that, but - no matter what parameters I choose - I always get the all-black image as an output. The whole image is black. I tried different thresholds and other starting seeds, but… no result.</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Here is a gist of my segmentation part:</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<a href="https://gist.github.com/jwitos/4b953b3ef873fee3965c" target="_blank">https://gist.github.com/jwitos/4b953b3ef873fee3965c</a></div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
I would really appreciate any help or tip</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
<br>
</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Best,</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Jan Witowski</div>
<div style="font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);margin:0px;line-height:auto">
Collegium Medicum Jagiellonian University in Krakow</div>
</div>
<br>
_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</span></blockquote>
</div></div></div>
</blockquote></div><br></div>