0

I'm trying to work with filters "unsharp-mask" for DICOM files and or .mhd (goal). In C ++ recommended the use of ITK, within it there is UnsharpMaskLevelSetImageFilter class, it does exactly what I want, for 2D images. When I use a imageType volume to .dcm files or .mhd the filter does not work. Can anyone tell me if it is compatible with volume? Or if there is any way to create unsharp-mask in C ++?

this is my code:

itk::GDCMImageIOFactory::RegisterOneFactory();
itk::MetaImageIOFactory::RegisterOneFactory();

typedef float InputPixelType;
const int ImageDimension = 3;

typedef itk::Image< InputPixelType, ImageDimension >   InputImageType;
typedef itk::ImageFileReader< InputImageType >          ReaderType;
typedef itk::UnsharpMaskLevelSetImageFilter <InputImageType, InputImageType> FilterType;

ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName("D:\\31panoramica.mhd");

FilterType::Pointer filter = FilterType::New();
FilterWatcher watcher(filter);
filter->SetNumberOfThreads(100);

filter->SetMaxFilterIteration(10);
filter->SetNormalProcessUnsharpWeight(0.2);
filter->SetInput(reader->GetOutput());


filter->Update();

typedef itk::ImageFileWriter< InputImageType >  WriterType;

WriterType::Pointer writer = WriterType::New();
writer->SetFileName("D:\\31panoramica22.mhd");

writer->SetInput(filter->GetOutput());
writer->Update();
  • What exactly do you mean "it does not work"? Does it throw an exception? Do you get a file saved? Is the output identical to input? Being specific will help you to get a more accurate answer faster. – mirni Mar 10 '16 at 19:19
  • the filter when applied to 3D images , it takes some 2-3 hours processing. And entradad file of 20 mb end up with 2-3 GB in memory . I believe this is not the standard work it –  Mar 10 '16 at 19:33

0 Answers0