<div>Try updating the filter before getting the output, i.e.,</div><div><br></div><div>DifferenceFilter->Update();</div><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">ResultDicom = DifferenceFilter->GetOutput() ;</span></div>
<br><div class="gmail_quote">On Fri, Jul 22, 2011 at 11:31 AM, soheilghafurian <span dir="ltr"><<a href="mailto:soheilghafurian@yahoo.com">soheilghafurian@yahoo.com</a>></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'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< DicomPixelType , 2 > DicomImageType;<br>
<br>
#include <itkSubtractImageFilter.h><br>
<br>
class C_GetDicomDifference<br>
{<br>
typedef itk::SubtractImageFilter < DicomImageType , DicomImageType ,<br>
DicomImageType > 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 "GetDicomDifference.h"<br>
<br>
C_GetDicomDifference::C_GetDicomDifference ( DicomImageType::Pointer Dicom1,<br>
DicomImageType::Pointer Dicom2, DicomImageType::Pointer<br>
ResultDicom)<br>
{<br>
DifferenceFilter = DifferenceFilterType::New() ;<br>
DifferenceFilter->SetInput1 ( Dicom1 ) ;<br>
DifferenceFilter->SetInput2 ( Dicom2 ) ;<br>
<br>
ResultDicom = DifferenceFilter->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>