<div dir="ltr">Hi Yuzheng,<div><br></div><div style>I don't fully understand what you are trying to do, but if Zach can not help you on that I can give a try.</div><div style>If you want my help you will have to explain what is a "<span style="font-family:Arial;font-size:15px;line-height:17px">label map volume</span>".</div>
<div style><br></div><div style>Otherwise inside ParaView you can certainly load and save vtkImageData. </div><div style><br></div><div style>Seb</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 7, 2013 at 3:56 PM, Yuzheng Zhou <span dir="ltr"><<a href="mailto:yuzheng.zhou@kitware.com" target="_blank">yuzheng.zhou@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Hi All,</span></p>
<br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">I
am working on a Midas workflow allowing users to visualize medical
images using ParaViewWeb (PVW as below) and segment them using Slicer. Currently I am
struck in a problem: how to create a label map volume in
PVW, and need help from ParaView developers. This email is long
and I really appreciate your time reading it. </span></p><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">To
do PDF segmentation in Slicer, it requires at least two volumes: the
input volume (the image to be segmented) and a label map volume roughly</span><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:bold"> </span><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">outlining the structures to be segmented.</span></p>
<br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">In Slicer, the label map volume can be created using the “Paint” editor, (check step 5 </span><a href="http://public.kitware.com/Wiki/TubeTK/InteractivePDFSegmenter#Tutorial_Steps" style="text-decoration:none" target="_blank"><span style="font-size:15px;font-family:Arial;color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">http://public.kitware.com/Wiki/TubeTK/InteractivePDFSegmenter#Tutorial_Steps</span></a><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">).
But Midas only has a slice viewer supported by PVW python client. So I want to know how to create the label map volume using PVW. Here are my current thoughts: <br></span></p><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">step
1) let’s assume there are only two labels in the label map. All pixels
are labelled as 0 (background) initially. When a user starts painting
slice(s), I can manually track mouse movements, capture the co-ords,
map them to pixels and label these pixels as 1. Can PVW get such collection of pixels automatically?</span></p><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">step
2) how can I create the label map volume using the input volume and the
above label information using PVW? I guess I have to create
the label map volume from scratch using VTK. But I also don’t know how
to do it in VTK. Or there may exist an easier solution in PVW?</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><br>
</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"> </span></p>
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">step
3) suppose I have got the label map volume in a vtkImageData object. Do I need to convert it to a proxy object, or it can be saved to an
image file (.mha or .nrrd) directly via PVW? </span></p><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Thanks a lot. I would very much appropriate any feedback or instructions for any steps.</span></p>
<span class="HOEnZb"><font color="#888888">
<p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><br>
</span></p><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Yuzheng </span><br clear="all">
<br>-- <br><font color="#888888">Yuzheng Zhou<br>
R & D Engineer<br>
Kitware Inc.<br>
<a value="+19199696990">(919) 869-8857</a></font><a value="+19199696990"><span style="font-family:courier new,monospace"></span><br></a>
</font></span></div>
<br>_______________________________________________<br>
Paraview-developers mailing list<br>
<a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
<br></blockquote></div><br></div>