Skip to content

Commit

Permalink
Merge pull request #1009 from mdkus/master
Browse files Browse the repository at this point in the history
Fix: ImageViewer with VTK6
  • Loading branch information
taketwo committed Nov 21, 2014
2 parents fb4db10 + 5f5a93a commit 6d5bd4e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions visualization/src/image_viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ pcl::visualization::ImageViewer::ImageViewer (const std::string& window_title)
#endif
slice_->SetMapper (map);
ren_->AddViewProp (slice_);
ren_->GetActiveCamera ()->ParallelProjectionOn ();
interactor_->SetInteractorStyle (interactor_style_);
#endif

Expand Down Expand Up @@ -213,6 +214,9 @@ pcl::visualization::ImageViewer::addRGBImage (
#else
algo_->SetInputData (image);
algo_->Update ();
slice_->GetMapper ()->SetInputConnection (algo_->GetOutputPort ());
ren_->ResetCamera ();
ren_->GetActiveCamera ()->SetParallelScale (0.5 * win_->GetSize ()[1]);
#endif
}

Expand Down Expand Up @@ -272,6 +276,9 @@ pcl::visualization::ImageViewer::addMonoImage (
#else
algo_->SetInputData (image);
algo_->Update ();
slice_->GetMapper ()->SetInputConnection (algo_->GetOutputPort ());
ren_->ResetCamera ();
ren_->GetActiveCamera ()->SetParallelScale (0.5 * win_->GetSize ()[1]);
#endif
}

Expand Down

0 comments on commit 6d5bd4e

Please sign in to comment.