[Insight-users] Long feature vector for each pixel

G.Y.Zhao gyzhao at ee.oulu.fi
Fri Jun 2 11:14:49 EDT 2006


Hello,
  I would like to use CannySegmentationLevelSetImageFilter to segment some images and for the features, I want to use my own defined text feature files, not an image any longer. For each pixel, the feature is a vector with length 20. So I add 
typedef itk::Vector< float, 20 > FeatPixelType;

typedef itk::Image< FeatPixelType, Dimension > FeatImageType;

into the CannySegmentationLevelSetImageFilter.cxx file, and change some words into the following:

typedef itk::ImageFileReader< InternalImageType > ReaderType;

typedef itk::ImageFileReader< FeatImageType > FeatReaderType;

typedef itk::ImageFileWriter< OutputImageType > WriterType;



FeatReaderType::Pointer reader1 = FeatReaderType::New();

ReaderType::Pointer reader2 = ReaderType::New();

WriterType::Pointer writer = WriterType::New();



cannySegmentation->SetInput( reader2->GetOutput() );

cannySegmentation->SetFeatureImage( reader1->GetOutput() );

thresholder->SetInput( cannySegmentation->GetOutput() );

writer->SetInput( thresholder->GetOutput() );

But when I try to compile it, there always some errors about the pixel type with <float> and my <float,20>. 
I guess I need to update the sourcecode of some .cxx files. Are there somebody having encounted such problems and could you help me to deal with it?

Thanks,

-Zhao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060602/7f1d6741/attachment.html


More information about the Insight-users mailing list