Delete vtkObjectBase Object

The interface vtkObjectBase::UnRegister will reduce the reference count for pointer and delete the pointer if the reference count becomes zero. vtkObjectBase::Delete <= vtkObjectBase::UnRegister <= vtkObjectBase::UnRegisterInternal <= delete ptr vtkSmartPointerBase::~vtkSmartPointerBase { vtkObjectBase* object = this->Object; if(object) { this->Object = nullptr; object->UnRegister(nullptr); } } We can get the reference count and consumer Read more…

boost::progress_display

The class progress_display has definition and implementation in progress.hpp. The relevant example is in the following code snippet. Qt pro file: TEMPLATE = app CONFIG += console c++11 CONFIG -= app_bundle CONFIG -= qt INCLUDEPATH += /usr/local/Cellar/boost/1.66.0/include/ SOURCES += \ main.cpp main.cpp: #include <iostream> #include <boost/progress.hpp> #include <vector> #include <fstream> Read more…

Simple Examples For Handling Images With OpenCV

The original image and project are in the following part. CMakeLists.txt macro(use_cxx11) if (CMAKE_VERSION VERSION_LESS “3.1”) if (CMAKE_CXX_COMPILER_ID STREQUAL “GNU”) set (CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=gnu++11”) endif () else () set (CMAKE_CXX_STANDARD 11) endif () endmacro(use_cxx11) cmake_minimum_required(VERSION 2.8) project( cvMat ) use_cxx11() find_package( OpenCV REQUIRED ) add_executable( ${PROJECT_NAME} “main.cpp” ) target_link_libraries( ${PROJECT_NAME} Read more…

Run The First ITK Example On Mac

Environment: cmake 3.16.0-rc4 InsightToolkit-5.0.1 macOS Catalina 10.15 Build And Install ITK Download tar.gz file, extract it, create a building directory and go into it. Then build the ITK project and install it. cmake ../ -G “Unix Makefiles” \ -DModule_ItkVtkGlue:BOOL=ON make sudo make install — Installing: /usr/local/include/ITK-5.0/itkWatershedSegmentTree.h — Installing: /usr/local/include/ITK-5.0/itkMorphologicalWatershedImageFilter.h — Read more…

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X