<div>Try updating the filter before getting the output, i.e.,</div><div><br></div><div>DifferenceFilter-&gt;Update();</div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">ResultDicom = DifferenceFilter-&gt;GetOutput()  ;</span></div>
<br><div class="gmail_quote">On Fri, Jul 22, 2011 at 11:31 AM, soheilghafurian <span dir="ltr">&lt;<a href="mailto:soheilghafurian@yahoo.com">soheilghafurian@yahoo.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi guys. I am new ti ITK and I have written this class, but it doesn&#39;t pass<br>
the data to the pointer passed as ResultDicom. Does anybody know what the<br>
problem is? I would be very grateful for your help.<br>
<br>
<br>
// the header file GetDicomDifference.h<br>
<br>
typedef signed short DicomPixelType;<br>
typedef itk::Image&lt; DicomPixelType , 2 &gt; DicomImageType;<br>
<br>
#include &lt;itkSubtractImageFilter.h&gt;<br>
<br>
class C_GetDicomDifference<br>
{<br>
        typedef itk::SubtractImageFilter &lt; DicomImageType , DicomImageType ,<br>
DicomImageType &gt; DifferenceFilterType ;<br>
<br>
        DifferenceFilterType::Pointer DifferenceFilter ;<br>
<br>
public:<br>
        C_GetDicomDifference ( DicomImageType::Pointer , DicomImageType::Pointer ,<br>
DicomImageType::Pointer ) ;<br>
};<br>
<br>
//the source file:<br>
<br>
#include &quot;GetDicomDifference.h&quot;<br>
<br>
C_GetDicomDifference::C_GetDicomDifference ( DicomImageType::Pointer Dicom1,<br>
                                                                                        DicomImageType::Pointer Dicom2, DicomImageType::Pointer<br>
ResultDicom)<br>
{<br>
        DifferenceFilter = DifferenceFilterType::New() ;<br>
        DifferenceFilter-&gt;SetInput1 ( Dicom1 ) ;<br>
        DifferenceFilter-&gt;SetInput2 ( Dicom2 ) ;<br>
<br>
        ResultDicom = DifferenceFilter-&gt;GetOutput()  ;<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://itk-insight-users.2283740.n2.nabble.com/Class-doesn-t-pass-the-data-tp6610869p6610869.html" target="_blank">http://itk-insight-users.2283740.n2.nabble.com/Class-doesn-t-pass-the-data-tp6610869p6610869.html</a><br>

Sent from the ITK Insight Users mailing list archive at Nabble.com.<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>