[Insight-users] Class doesn't pass the data

robert tamburo robert.tamburo at gmail.com
Fri Jul 22 11:39:29 EDT 2011


Try updating the filter before getting the output, i.e.,

DifferenceFilter->Update();
ResultDicom = DifferenceFilter->GetOutput()  ;

On Fri, Jul 22, 2011 at 11:31 AM, soheilghafurian <soheilghafurian at yahoo.com
> wrote:

> Hi guys. I am new ti ITK and I have written this class, but it doesn't pass
> the data to the pointer passed as ResultDicom. Does anybody know what the
> problem is? I would be very grateful for your help.
>
>
> // the header file GetDicomDifference.h
>
> typedef signed short DicomPixelType;
> typedef itk::Image< DicomPixelType , 2 > DicomImageType;
>
> #include <itkSubtractImageFilter.h>
>
> class C_GetDicomDifference
> {
>        typedef itk::SubtractImageFilter < DicomImageType , DicomImageType ,
> DicomImageType > DifferenceFilterType ;
>
>        DifferenceFilterType::Pointer DifferenceFilter ;
>
> public:
>        C_GetDicomDifference ( DicomImageType::Pointer ,
> DicomImageType::Pointer ,
> DicomImageType::Pointer ) ;
> };
>
> //the source file:
>
> #include "GetDicomDifference.h"
>
> C_GetDicomDifference::C_GetDicomDifference ( DicomImageType::Pointer
> Dicom1,
>
>            DicomImageType::Pointer Dicom2, DicomImageType::Pointer
> ResultDicom)
> {
>        DifferenceFilter = DifferenceFilterType::New() ;
>        DifferenceFilter->SetInput1 ( Dicom1 ) ;
>        DifferenceFilter->SetInput2 ( Dicom2 ) ;
>
>        ResultDicom = DifferenceFilter->GetOutput()  ;
>
>
>
> --
> View this message in context:
> http://itk-insight-users.2283740.n2.nabble.com/Class-doesn-t-pass-the-data-tp6610869p6610869.html
> Sent from the ITK Insight Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110722/2e8c4917/attachment.htm>


More information about the Insight-users mailing list