二值取反
std::cout <<"----二值图像01取反----"<< std::endl;
typedef itk::ShiftScaleImageFilter< ImageType, ImageType >ShiftScaleType0;
ShiftScaleType0::Pointer shiftScale0 = ShiftScaleType0::New();
shiftScale0->SetInput( dilateFilter->GetOutput());
shiftScale0->SetShift(-1);
shiftScale0->SetScale(-1);
shiftScale0->Update();
std::cout << "New size: " << shiftScale0->GetOutput()->GetLargestPossibleRegion().GetSize() << std::endl;
本文介绍了一种基于ITK库实现的二值图像01取反方法。具体步骤包括设置输入为膨胀过滤器的输出,然后通过移位缩放过滤器进行取反操作,并更新结果。
472

被折叠的 条评论
为什么被折叠?



