hello,
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 this one:
- ScalarImageToListAdaptor
- SelectiveSubsampleGenerator
- ListSampleToHistogramGenerator