<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div><div><div><div><div>Hi Elena,<br></div>I compiled and tested your example code.<br></div>I found that there was a conflict between the return of the function and the argument (output),<br>
</div><div>also I think output allocation on the function is not necesary since you assign it a valid output.<br>
</div>Here a version of your code that worked.<br></div></div><div><div><div><div><div><br></div></div></div></div></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr">Nicolás Gallego-Ortiz<br>UniversitĂ© catholique de Louvain, Belgium<br>

</div></div>
<br><br><div class="gmail_quote">2014-07-17 14:43 GMT+02:00 elena bresciani <span dir="ltr"><<a href="mailto:elena.bresciani87@gmail.com" target="_blank">elena.bresciani87@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<div dir="ltr"><div><div><div><div><div><div><div>Hello guys,<br><br></div>I'm developing a really complicated pipeline and to avoid repetitions and unreadeble code I thought of writing the different pieces of code as functions, each with a single specific purpose. <br>


</div>Since I'm not really a C++ master I started with a very simple pipeline (reader -> rescale intensity filter -> writer), where the rescale intensity filter is in a separate function, outside the main(). <br>


</div>The code compiles and it even runs but the output is not what it would have to be.<br><br></div>Can someone help me find where is the error? <br><br></div>Attached you can find my code, a test image and the respective output.<br>


<br></div>Thanks in advance<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">Elena <br></font></span></div>
<br></div></div>_____________________________________<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.php" target="_blank">http://www.kitware.com/products/protraining.php</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://public.kitware.com/mailman/listinfo/insight-users" target="_blank">http://public.kitware.com/mailman/listinfo/insight-users</a><br>
<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" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br>
<br></blockquote></div><br></div>
</div><br></div>