Hi Tobias - <br><br>I faced the same issue with the label map editor in slicer so I wrote a class called vtkImageSlicePaint.  You specify a mask image data and the corner points of it in the target label volume and it rasterizes the mask into target volume.<br>
<br>It also does a couple other things that I needed, like conditionally applying the mask depending on a threshold condition of a background grayscale image and also conditionally on whether the label map already has a non-zero value.<br>
<br>HTH,<br>Steve<br><br>ps.<br>The user documentation for the tool that uses it is here:<br> <br><a href="http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.0/Modules/Editor">http://wiki.slicer.org/slicerWiki/index.php/Documentation/4.0/Modules/Editor</a><br>
<br>and the source code is here:<br><br><a href="http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Base/Logic/vtkImageSlicePaint.h?revision=12142&view=markup">http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Base/Logic/vtkImageSlicePaint.h?revision=12142&view=markup</a><br>
<br><a href="http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Base/Logic/vtkImageSlicePaint.cxx?view=markup">http://viewvc.slicer.org/viewvc.cgi/Slicer4/trunk/Base/Logic/vtkImageSlicePaint.cxx?view=markup</a><br><br><div class="gmail_quote">
2011/12/2 Schröder, Tobias <span dir="ltr"><<a href="mailto:t.schroeder@dkfz-heidelberg.de">t.schroeder@dkfz-heidelberg.de</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="DE"><div><p class="MsoNormal">Hi All,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span lang="EN-US">I’m working on tool for MITK which extracts an arbitrary  oriented <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">oblique slice from a volume, edits this slice and then the slice is written <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">back to the volume. <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">For the slice extraction I’m already using vtkImageReslice.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">But what about the writing, is there an existing vtk class fitting this purpose?<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US">For the case if not ( => I have to write one on my own) , can anybody<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">help me with the algorithm behind vtkImageReslice (it is really a monster ;-) ). <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Thank you for your help.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">Regards ,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Tobias Schröder<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">German Cancer Research Center (Deutsches Krebsforschungszentrum, DKFZ) <br>
Member of the Helmholtz Association<br>Division Medical and Biological Informatics E130<br>Im Neuenheimer Feld 280<br>D-69120 Heidelberg</span><span style="font-size: 12pt; font-family: "Times New Roman","serif";" lang="EN-US"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><br></span>E-Mail: <a href="mailto:t.schroeder@dkfz-heidelberg.de" target="_blank"><span style="color: windowtext;">t.schroeder@dkfz-heidelberg.de</span></a><br>Web: <span lang="EN-US"><a href="http://www.dkfz.de" target="_blank"><span style="color: windowtext; text-decoration: none;" lang="DE">www.dkfz.de</span></a></span><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div><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 <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br>