I am using shapeOpeningLabelMapFilter and I am getting a strange message saying the attributes are not a member of ShapeOpeningLabelMapFilter.
/usr/local/include/ITK-5.2/itkShapeOpeningLabelMapFilter.hxx:44:5: error: ‘FERET_DIAMETER’ is not a member of ‘itk::ShapeOpeningLabelMapFilter<itk::LabelMap<itk::LabelObject<long unsigned int, 3> > >::LabelObjectType’ {aka ‘itk::LabelObject<long unsigned int, 3>’}
Here is my code:
auto binaryImageToShapeLabelMapFilter = BinaryImageToLabelMapFilterType_Nodule::New();
binaryImageToShapeLabelMapFilter->SetInput(Binary_Nodule->GetOutput());
binaryImageToShapeLabelMapFilter->Update();
// Remove label objects that have PERIMETER greater than 50
typedef itk::ShapeOpeningLabelMapFilter< BinaryImageToLabelMapFilterType_Nodule::OutputImageType > ShapeOpeningLabelMapFilterType_Nodule;
auto shapeOpening_nodule = ShapeOpeningLabelMapFilterType_Nodule::New();
shapeOpening_nodule->SetInput( binaryImageToShapeLabelMapFilter->GetOutput());
shapeOpening_nodule->SetLambda( 33 );
shapeOpening_nodule->ReverseOrderingOn();
shapeOpening_nodule->SetAttribute( ShapeOpeningLabelMapFilterType_Nodule::LabelObjectType::EQUIVALENT_ELLIPSOID_DIAMETER);
shapeOpening_nodule->Update();
error: ‘EQUIVALENT_ELLIPSOID_DIAMETER’ is not a member of ‘itk::ShapeOpeningLabelMapFilter<itk::LabelMap<itk::LabelObject<long unsigned int, 3> > >::LabelObjectType’ {aka ‘itk::LabelObject<long unsigned int, 3>’}
7950 | shapeOpening_nodule->SetAttribute( ShapeOpeningLabelMapFilterType_Nodule::LabelObjectType::EQUIVALENT_ELLIPSOID_DIAMETER);
|
I am almost certain it is not because it is a 3D image. It is also very doubtful it is because the original image was 64-bit. It is probably because of syntax. Maybe take a look at the tests (123) to figure out proper syntax.