Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The example BasicRegionGrowing fails to compile #400

Open
yurivict opened this issue Nov 19, 2022 · 2 comments
Open

The example BasicRegionGrowing fails to compile #400

yurivict opened this issue Nov 19, 2022 · 2 comments
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances

Comments

@yurivict
Copy link

This example fails:

/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:48:15: error: no member named 'SetLower' in 'itk::Object'
  regionGrow->SetLower(lower);
  ~~~~~~~~~~~~^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:49:15: error: no member named 'SetUpper' in 'itk::Object'
  regionGrow->SetUpper(upper);
  ~~~~~~~~~~~~^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:51:15: error: no member named 'SetReplaceValue' in 'itk::Object'
  regionGrow->SetReplaceValue(255);
  ~~~~~~~~~~~~^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:57:15: error: no member named 'SetSeed' in 'itk::Object'
  regionGrow->SetSeed(seed1);
  ~~~~~~~~~~~~^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:58:15: error: no member named 'SetInput' in 'itk::Object'
  regionGrow->SetInput(image);
  ~~~~~~~~~~~~^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:64:15: error: no member named 'SetSeed' in 'itk::Object'
  regionGrow->SetSeed(seed2);
  ~~~~~~~~~~~~^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:65:15: error: no member named 'SetReplaceValue' in 'itk::Object'
  regionGrow->SetReplaceValue(150);
  ~~~~~~~~~~~~^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:67:15: error: no member named 'SetInput' in 'itk::Object'
  regionGrow->SetInput(image);
  ~~~~~~~~~~~~^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:72:24: error: use of undeclared identifier 'image2'; did you mean 'image'?
  connector2->SetInput(image2);
                       ^~~~~~
                       image
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:41:8: note: 'image' declared here
  auto image = ImageType::New();
       ^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:75:11: error: no member named 'SetInput' in 'vtkImageActor'
  actor2->SetInput(connector2->GetOutput());
  ~~~~~~~~^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:79:26: error: use of undeclared identifier 'addFilter'
  addConnector->SetInput(addFilter->GetOutput());
                         ^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:82:13: error: no member named 'SetInput' in 'vtkImageActor'
  addActor->SetInput(addConnector->GetOutput());
  ~~~~~~~~~~^
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:114:26: error: use of undeclared identifier 'actor1'; did you mean 'actor2'?
  leftRenderer->AddActor(actor1);
                         ^~~~~~
                         actor2
/disk-samsung/freebsd-ports/science/InsightToolkit/BasicRegionGrowing/Code.cxx:74:34: note: 'actor2' declared here
  vtkSmartPointer<vtkImageActor> actor2 = vtkSmartPointer<vtkImageActor>::New();
                                 ^

Version: 5.3rc04
clang-14
FreeBSD 13.1

@yurivict yurivict added the type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances label Nov 19, 2022
@dzenanz dzenanz transferred this issue from InsightSoftwareConsortium/ITK Nov 21, 2022
@dzenanz
Copy link
Member

dzenanz commented Nov 21, 2022

TL;DR This example is broken.

This example isn't enabled when I configure the whole repository. The likely reason is that it doesn't build, and from the looks of git history it has been broken ever since it was migrated from the Wiki Examples. The error message on my computer is 3>C:\Dev\ITKExamples\src\Segmentation\KLMRegionGrowing\BasicRegionGrowing\Code.cxx(24,10): fatal error C1083: Cannot open include file: 'vtkImageViewer.h': No such file or directory, but I also see squiggles under SetLower etc. By looking at the code of itk::RegionGrowImageFilter, it is an abstract class.

@dzenanz
Copy link
Member

dzenanz commented Nov 21, 2022

While looking into this, I uncovered #401.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances
Projects
None yet
Development

No branches or pull requests

2 participants