#include "vtkVersion.h"
#include "vtkImageViewer.h"
#include "vtkImageMapper3D.h"
#include "vtkRenderWindowInteractor.h"
#include "vtkSmartPointer.h"
#include "vtkImageActor.h"
#include "vtkInteractorStyleImage.h"
#include "vtkRenderer.h"
#include "vtkSphereSource.h"
#include "vtkPolyDataMapper.h"
#include "vtkActor.h"
#include "vtkProperty.h"
int
main(int argc, char * argv[])
{
if (argc < 2)
{
std::cerr << "Required: filename" << std::endl;
return EXIT_FAILURE;
}
const auto input = itk::ReadImage<ImageType>(argv[1]);
imageCalculatorFilter->SetImage(input);
imageCalculatorFilter->Compute();
originalConnector->SetInput(input);
#if VTK_MAJOR_VERSION <= 5
originalActor->SetInput(originalConnector->GetOutput());
#else
originalConnector->Update();
originalActor->GetMapper()->SetInputData(originalConnector->GetOutput());
#endif
minimumSphereSource->SetCenter(minimumLocation[0], minimumLocation[1], 0);
minimumSphereSource->SetRadius(10);
minimumMapper->SetInputConnection(minimumSphereSource->GetOutputPort());
minimumActor->SetMapper(minimumMapper);
minimumActor->GetProperty()->SetColor(0, 1, 0);
maximumSphereSource->SetRadius(10);
maximumSphereSource->SetCenter(maximumLocation[0], maximumLocation[1], 0);
maximumMapper->SetInputConnection(maximumSphereSource->GetOutputPort());
maximumActor->SetMapper(maximumMapper);
maximumActor->GetProperty()->SetColor(1, 0, 0);
interactor->SetRenderWindow(renderWindow);
renderWindow->AddRenderer(renderer);
renderer->AddActor(originalActor);
renderer->AddActor(minimumActor);
renderer->AddActor(maximumActor);
renderer->ResetCamera();
renderWindow->Render();
interactor->SetInteractorStyle(style);
interactor->Start();
return EXIT_SUCCESS;
}