Hi Naved,
The ConstantImageSource filter generates an image with all pixels set to
the same value (default value is 0), out of nothing. It does noes need
an input. In fact, it cannot take an input.
I do not know MITK, but mitk::CastToItkImage seems like a method that
should return something. Something like a pointer to the image, cast as
ITK image. You probably need to get this pointer and set it as input 1
of the FDK filter.
Something like this, assuming there is something called ImageType in mitk :
mitk::ImageType::Pointer castImagePointer = mitk::CastToItkImage(image,
Img3DFloat);
f->SetInput( 1, castImagePointer );
Note that circumventing the rtk::ProjectionsReader filter in such a way
is usually a bad idea: before they can be back projected, projections
usually need a lot of pre-processing, which is performed in the
projections reader (like log-transform, LUT, parker weighting for short
scans, offset-detector weighting, scatter correction, etc...).
Hope it helps,
Cyril
On 03/18/2016 06:55 PM, naved chaudhri wrote:
Hi,
I'm integrating RTK in an application that reads the raw projections
from a dicom file. After reading dicom I have the data as itk::image
object. At this point, I am facing difficulty in finding a way to
assign the itk::image to rtk::ConstantImageSource or
rtk::ProjectionsReader or not getting the way to
rtk::FDKConeBeamReconstructionFilter for the reconstruction.
All the application examples I went through were projections as stack
based.
Following are few lines I have written.
//
typedef itk::Image<float, 3> InImageType;
InImageType::Pointer Img3DFloat = InImageType::New();
mitk::CastToItkImage(image, Img3DFloat); //Works (I use MITK for
reading and visualization)
typename ConstantImageSourceType::Pointer iFilter =
ConstantImageSourceType::New();
//iFilter->SetInformationFromImage( Img3DFloat ); // No compilation
error but Empty Reconstruction
iFilter->SetInput(Img3DFloat ); //Compilation Error
CbctGenerator.cpp:1338: error: no matching function for call to
'rtk::ConstantImageSource<itk::Image<float, 3u>
>::SetInput(itk::Image<float, 3u>::Pointer&)'
iFilter->SetInput(Img3DFloat ); // produces compilation error
^
//
Thanks in advance for any hint.
Bests,
Naved
_______________________________________________
Rtk-users mailing list
[email protected]
http://public.kitware.com/mailman/listinfo/rtk-users
_______________________________________________
Rtk-users mailing list
[email protected]
http://public.kitware.com/mailman/listinfo/rtk-users