Class doesn't pass data

Hi guys. 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 types are taken from another library and this code works fine when put in the main code. But when I write this class to do the same thing, the data is not passed to the pointer which comes as ResultDicom. So, I thought I might have made a c++ mistake. Could you please check it for me?


// the header file GetDicomDifference.h


#include <itkSubtractImageFilter.h>

class C_GetDicomDifference
{

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() ;
}
ResultDicom needs to be passed by reference.
Thanks a lot man. You're right! I was missing that part!
Topic archived. No new replies allowed.