[Insight-users] 'install'ing ITK

David Doria daviddoria at gmail.com
Mon Apr 18 13:12:20 EDT 2011


On Mon, Apr 18, 2011 at 1:01 PM, Bill Lorensen <bill.lorensen at gmail.com> wrote:
> By default the new modularized ITK only has a small number of classes enabled.
>
> Also, I'm not sure if the installl stuff has been fixed yet.
>
> Now is a good time to bring up these issues, sinve ITKv4 is still in alpha.

Ah, of course, I forgot to re-enable ITKGroup_Filtering and
ITKGroup_IO for my fresh build. The headers are indeed copied with
'make install' with the modules enabled. I don't suppose there would
be some way of catching a "missing header" error like that and
contributing it to "you need to enable XYZ module"?

Also, now that the header is found, I get this error:

CMakeFiles/Simple.dir/Simple.cxx.o:(.data+0x34): undefined reference
to `itk::MRCImageIOFactoryRegister__Private()'

with this very simple code:

#include "itkImage.h"
#include "itkImageFileReader.h"
#include "itkRescaleIntensityImageFilter.h"

int main(int argc, char *argv[])
{

  typedef itk::Image<unsigned char, 2>  ImageType;

  typedef itk::ImageFileReader<ImageType> ReaderType;
  ReaderType::Pointer reader = ReaderType::New();
  reader->SetFileName(argv[1]);

  typedef itk::RescaleIntensityImageFilter< ImageType, ImageType >
RescaleFilterType;
  RescaleFilterType::Pointer rescaleFilter = RescaleFilterType::New();
  rescaleFilter->SetInput(reader->GetOutput());
  rescaleFilter->SetOutputMinimum(0);
  rescaleFilter->SetOutputMaximum(255);

  return EXIT_SUCCESS;
}

Any thoughts on that one?

David


More information about the Insight-users mailing list