diff --git a/Modules/Bridge/NumPy/include/itkPyBuffer.hxx b/Modules/Bridge/NumPy/include/itkPyBuffer.hxx index e5853eb1019..1618a2bf2ef 100644 --- a/Modules/Bridge/NumPy/include/itkPyBuffer.hxx +++ b/Modules/Bridge/NumPy/include/itkPyBuffer.hxx @@ -28,7 +28,7 @@ template PyObject * PyBuffer::_GetArrayViewFromImage(ImageType * image) { - PyObject * memoryView = NULL; + PyObject * memoryView = nullptr; Py_buffer pyBuffer{}; Py_ssize_t len = 1; @@ -58,7 +58,7 @@ PyBuffer::_GetArrayViewFromImage(ImageType * image) len *= numberOfComponents; len *= sizeof(ComponentType); - res = PyBuffer_FillInfo(&pyBuffer, NULL, itkImageBuffer, len, 0, PyBUF_CONTIG); + res = PyBuffer_FillInfo(&pyBuffer, nullptr, itkImageBuffer, len, 0, PyBUF_CONTIG); memoryView = PyMemoryView_FromBuffer(&pyBuffer); PyBuffer_Release(&pyBuffer); @@ -71,8 +71,8 @@ auto PyBuffer::_GetImageViewFromArray(PyObject * arr, PyObject * shape, PyObject * numOfComponent) -> const OutputImagePointer { - PyObject * shapeseq = NULL; - PyObject * item = NULL; + PyObject * shapeseq = nullptr; + PyObject * item = nullptr; Py_buffer pyBuffer{}; @@ -111,7 +111,7 @@ PyBuffer::_GetImageViewFromArray(PyObject * arr, PyObject * shape, PyObj } bool isFortranContiguous = false; - if (pyBuffer.strides != NULL && pyBuffer.itemsize == pyBuffer.strides[0]) + if (pyBuffer.strides != nullptr && pyBuffer.itemsize == pyBuffer.strides[0]) { isFortranContiguous = true; } diff --git a/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx b/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx index c89c39bd120..46a16a9661e 100644 --- a/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx +++ b/Modules/Bridge/NumPy/include/itkPyVectorContainer.hxx @@ -27,7 +27,7 @@ template PyObject * PyVectorContainer::_array_view_from_vector_container(VectorContainerType * vector) { - PyObject * memoryView = NULL; + PyObject * memoryView = nullptr; Py_buffer pyBuffer{}; int res = 0; @@ -45,7 +45,7 @@ PyVectorContainer::_array_view_from_vector_contain Py_ssize_t len = vector->Size(); len *= sizeof(DataType); - res = PyBuffer_FillInfo(&pyBuffer, NULL, vectorBuffer, len, 0, PyBUF_CONTIG); + res = PyBuffer_FillInfo(&pyBuffer, nullptr, vectorBuffer, len, 0, PyBUF_CONTIG); memoryView = PyMemoryView_FromBuffer(&pyBuffer); PyBuffer_Release(&pyBuffer); @@ -58,9 +58,9 @@ auto PyVectorContainer::_vector_container_from_array(PyObject * arr, PyObject * shape) -> const typename VectorContainerType::Pointer { - PyObject * obj = NULL; - PyObject * shapeseq = NULL; - PyObject * item = NULL; + PyObject * obj = nullptr; + PyObject * shapeseq = nullptr; + PyObject * item = nullptr; Py_buffer pyBuffer{}; diff --git a/Modules/Bridge/NumPy/include/itkPyVnl.hxx b/Modules/Bridge/NumPy/include/itkPyVnl.hxx index 8fdca392f60..85da91664c4 100644 --- a/Modules/Bridge/NumPy/include/itkPyVnl.hxx +++ b/Modules/Bridge/NumPy/include/itkPyVnl.hxx @@ -27,7 +27,7 @@ template PyObject * PyVnl::_GetArrayViewFromVnlVector(VectorType * vector) { - PyObject * memoryView = NULL; + PyObject * memoryView = nullptr; Py_buffer pyBuffer{}; int res = 0; @@ -45,7 +45,7 @@ PyVnl::_GetArrayViewFromVnlVector(VectorType * vector) Py_ssize_t len = vector->size(); len *= sizeof(DataType); - res = PyBuffer_FillInfo(&pyBuffer, NULL, vectorBuffer, len, 0, PyBUF_CONTIG); + res = PyBuffer_FillInfo(&pyBuffer, nullptr, vectorBuffer, len, 0, PyBUF_CONTIG); memoryView = PyMemoryView_FromBuffer(&pyBuffer); PyBuffer_Release(&pyBuffer); @@ -57,9 +57,9 @@ template auto PyVnl::_GetVnlVectorFromArray(PyObject * arr, PyObject * shape) -> const VectorType { - PyObject * obj = NULL; - PyObject * shapeseq = NULL; - PyObject * item = NULL; + PyObject * obj = nullptr; + PyObject * shapeseq = nullptr; + PyObject * item = nullptr; Py_buffer pyBuffer{}; @@ -104,7 +104,7 @@ template PyObject * PyVnl::_GetArrayViewFromVnlMatrix(MatrixType * matrix) { - PyObject * memoryView = NULL; + PyObject * memoryView = nullptr; Py_buffer pyBuffer{}; int res = 0; @@ -122,7 +122,7 @@ PyVnl::_GetArrayViewFromVnlMatrix(MatrixType * matrix) Py_ssize_t len = matrix->size(); len *= sizeof(DataType); - res = PyBuffer_FillInfo(&pyBuffer, NULL, matrixBuffer, len, 0, PyBUF_CONTIG); + res = PyBuffer_FillInfo(&pyBuffer, nullptr, matrixBuffer, len, 0, PyBUF_CONTIG); memoryView = PyMemoryView_FromBuffer(&pyBuffer); PyBuffer_Release(&pyBuffer); @@ -134,9 +134,9 @@ template auto PyVnl::_GetVnlMatrixFromArray(PyObject * arr, PyObject * shape) -> const MatrixType { - PyObject * obj = NULL; - PyObject * shapeseq = NULL; - PyObject * item = NULL; + PyObject * obj = nullptr; + PyObject * shapeseq = nullptr; + PyObject * item = nullptr; Py_buffer pyBuffer{};