[Insight-users] ITK and type casting

Urlek crapie at email.si
Fri Mar 30 06:47:48 EST 2007


Hi,

   I have a problem with casting that seem to defy all my understanding
about it (which, I admit, is not very deep). 

   I would like to use an itk::ImageSource as the beginning of the pipeline
but instantaniate it as either an ImageFileReader or ImageSeriesReader,
which is to be decided at the run-time. But I somehow can not use sub-class
member functions (ImageFileReader or ImageSeriesReader) if I define the
source to be ImageSource!

For Example:

  typedef itk::ImageSource< InputImageType >  SourceType;
  typedef itk::ImageFileReader< InputImageType >  FileReaderType;

  SourceType::Pointer reader = SeriesReaderType::New();

How do I now call reader's SetFileNames(), which is member of
SeriesReaderType but not SourceType?

-- 
View this message in context: http://www.nabble.com/ITK-and-type-casting-tf3491684.html#a9751546
Sent from the ITK - Users mailing list archive at Nabble.com.



More information about the Insight-users mailing list