Category : itk

i have this old code and io want to adapt to the newer ITK, typedef itk::Statistics::ScalarImageToListAdaptor<ImageType> ImageListSample; typedef itk::Statistics::ScalarImageToListAdaptor<MaskImageType> MaskListSample; typedef itk::Statistics::SelectiveSubsampleGenerator<ImageListSample,MaskListSample>SubsampleGeneratorType; typedef itk::Statistics::ListSampleToHistogramGenerator<SubsampleGeneratorType::OutputType,float> HistogramGeneratorType; ImageListSample::Pointer imageListSample = ImageListSample::New(); imageListSample->SetImage(imageReader->GetOutput()); MaskListSample::Pointer maskListSample = MaskListSample::New(); maskListSample->SetImage(thresholdFilter->GetOutput()); SubsampleGeneratorType::ClassLabelVectorType selectedLabels; selectedLabels.push_back(itk::NumericTraits<SubsampleGeneratorType::ClassLabelType>::One); std::cout << "Generating masked subsample" << std::endl; SubsampleGeneratorType::Pointer subsampleGenerator = SubsampleGeneratorType::New(); subsampleGenerator->SetInput(imageListSample); subsampleGenerator->SetClassMask(maskListSample); subsampleGenerator->SetSelectedClassLabels(selectedLabels); what functions replace ..

Read more

I am trying to write a DICOM image with ITK with the following code: #include "itkImage.h" #include "itkImageSeriesWriter.h" #include "itkNumericSeriesFileNames.h" #include "itkGDCMImageIO.h" typedef int16_t PixelType; typedef itk::Image< PixelType, 3 > ImageType; typedef itk::Image< PixelType, 2 > Image2DType; ImageType::Pointer m_image; // declared as member in my class void DICOMImage::writeImage(string repository) { using WriterType = itk::ImageSeriesWriter<ImageType, Image2DType>; ..

Read more

I am working with some DICOM images and I use ITK for this. I would like to compute the PCA of a binary image of a tumor. I found and tried to use the ImagePCADecompositionCalculator class, but could not retrieve the mean, eigenvalues or eigenvectors. It seems only to be used to create some statistical ..

Read more