Skip to content

Commit

Permalink
[CORE] Renamed vpDisplayFactory::displayFactory() method into vpDispl…
Browse files Browse the repository at this point in the history
…ayFactory::allocateDisplay()
  • Loading branch information
rlagneau committed Jul 1, 2024
1 parent c25547e commit 70591bb
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion example/particle-filter/pf-nonlinear-example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ int main(const int argc, const char *argv[])
// first video device which is available
#ifdef VISP_HAVE_DISPLAY
std::shared_ptr<vpDisplay> d;
vpImage<vpRGBa> Idisp(800, 800, vpRGBa(255));
vpImage<vpRGBa> Idisp(800, 800, vpRGBa(static_cast<unsigned char>(255)));
if (args.m_useDisplay) {
d = vpDisplayFactory::createDisplay(Idisp, 800, 50, "Projection of the markers");
}
Expand Down
2 changes: 1 addition & 1 deletion modules/gui/include/visp3/gui/vpDisplayFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ namespace vpDisplayFactory
* \return A newly allocated vpDisplay specialization
* if a GUI library is available or nullptr otherwise.
*/
vpDisplay *displayFactory()
vpDisplay *allocateDisplay()
{
#if defined(VISP_HAVE_DISPLAY)
#ifdef VISP_HAVE_X11
Expand Down
2 changes: 1 addition & 1 deletion tutorial/grabber/tutorial-grabber-1394-writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ int main(int argc, char **)
using namespace VISP_NAMESPACE_NAME;
#endif
#ifdef VISP_HAVE_DISPLAY
vpDisplay *d = vpDisplayFactory::displayFactory();
vpDisplay *d = vpDisplayFactory::allocateDisplay();
#else
std::cout << "No image viewer is available..." << std::endl;
#endif
Expand Down
2 changes: 1 addition & 1 deletion tutorial/grabber/tutorial-grabber-v4l2-threaded.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ void displayFunction(std::mutex &mutex_capture, vpImage<unsigned char> &frame, t

t_CaptureState capture_state_;
bool display_initialized_ = false;
vpDisplay *d_ = vpDisplayFactory::displayFactory();
vpDisplay *d_ = vpDisplayFactory::allocateDisplay();

do {
mutex_capture.lock();
Expand Down
2 changes: 1 addition & 1 deletion tutorial/grabber/tutorial-video-reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ int main(int argc, char **argv)
std::cout << "Video dimension: " << I.getWidth() << " " << I.getHeight() << std::endl;

#ifdef VISP_HAVE_DISPLAY
vpDisplay *d = vpDisplayFactory::displayFactory(I);
vpDisplay *d = vpDisplayFactory::allocateDisplay(I);
#else
std::cout << "No image viewer is available..." << std::endl;
#endif
Expand Down
2 changes: 1 addition & 1 deletion tutorial/grabber/tutorial-video-recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ int main(int argc, const char *argv[])
std::cout << "Image size: " << I.getWidth() << " " << I.getHeight() << std::endl;

#if defined(VISP_HAVE_DISPLAY)
vpDisplay *d = vpDisplayFactory::displayFactory();
vpDisplay *d = vpDisplayFactory::allocateDisplay();
d->init(I, 0, 0, "Camera view");
#endif
vpVideoWriter writer;
Expand Down
4 changes: 2 additions & 2 deletions tutorial/image/tutorial-draw-circle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ int main()
try {
{
#if defined(VISP_HAVE_DISPLAY)
vpDisplay *d = vpDisplayFactory::displayFactory(I, vpDisplay::SCALE_AUTO);
vpDisplay *d = vpDisplayFactory::allocateDisplay(I, vpDisplay::SCALE_AUTO);
#else
std::cout << "No gui available to display gray level image..." << std::endl;
#endif
Expand Down Expand Up @@ -64,7 +64,7 @@ int main()
//! [Circle draw color]

#if defined(VISP_HAVE_DISPLAY)
vpDisplay *d = vpDisplayFactory::displayFactory(I_rgb, vpDisplay::SCALE_AUTO);
vpDisplay *d = vpDisplayFactory::allocateDisplay(I_rgb, vpDisplay::SCALE_AUTO);
#else
std::cout << "No gui available to display color image..." << std::endl;
#endif
Expand Down
2 changes: 1 addition & 1 deletion tutorial/robot/mbot/raspberry/visp/mbot-apriltag-ibvs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ int main(int argc, const char **argv)
vpImage<vpRGBa> O;
#ifdef VISP_HAVE_DISPLAY
if (display_on) {
d = vpDisplayFactory::displayFactory(I);
d = vpDisplayFactory::allocateDisplay(I);
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion tutorial/robot/mbot/raspberry/visp/mbot-apriltag-pbvs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ int main(int argc, const char **argv)
vpImage<vpRGBa> O;
#ifdef VISP_HAVE_DISPLAY
if (display_on) {
d = vpDisplayFactory::displayFactory(I);
d = vpDisplayFactory::allocateDisplay(I);
}
#endif

Expand Down

0 comments on commit 70591bb

Please sign in to comment.