From 04647b34edfe916406dd8724c74b4d866a6390f0 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Fillion-Robin Date: Mon, 19 Aug 2024 10:18:26 -0400 Subject: [PATCH] STYLE: Ensure source files line ending is consistent Makes sure files end in a newline and only a newline. This commit updates the sources files based on the automatic fixes applied using the "end-of-file-fixer" pre-commit hook introduced in the subsequent commit. --- .github/workflows/pre-commit.yml | 1 - BUILD.md | 1 - CMake/ExternalProjectDependency.cmake | 2 +- CMake/FindFilesystem.cmake | 1 - CMake/PreventInSourceBuilds.cmake | 2 +- Documentation/adv-topics/index.md | 2 +- Documentation/developer-guide/building-autoscoper.md | 2 +- Documentation/developer-guide/contributing.md | 2 +- Documentation/file-specifications/config.md | 2 +- Documentation/file-specifications/index.md | 2 +- Documentation/get-help.md | 1 - Documentation/socket-control-libraries/pyautoscoper.md | 1 - Documentation/tutorials/tips-and-tricks.md | 2 +- autoscoper/src/ui/AboutAutoscoper.cpp | 2 +- autoscoper/src/ui/FilterTreeWidgetParameter.h | 2 +- autoscoper/src/ui/ImportExportTrackingOptionsDialog.cpp | 2 +- autoscoper/src/ui/NewTrialDialog.cpp | 2 +- autoscoper/src/ui/OpenCLPlatformSelectDialog.cpp | 2 +- autoscoper/src/ui/QtCategoryButton.cpp | 2 +- autoscoper/src/ui/QtCategoryButton.h | 2 +- autoscoper/src/ui/TrackingOptionsDialog.cpp | 2 +- autoscoper/src/ui/VolumeBox.cpp | 2 +- autoscoper/src/ui/VolumeListWidgetItem.cpp | 2 +- autoscoper/src/ui/WorldViewWindow.cpp | 2 +- libautoscoper/src/Win32/dirent.h | 1 - libautoscoper/src/gpu/cuda/ContrastFilter_kernels.h | 2 +- libautoscoper/src/gpu/cuda/Mult_kernels.h | 2 +- libautoscoper/src/gpu/cuda/PSO_kernel.cu | 2 +- libautoscoper/src/gpu/opencl/CMakeLists.txt | 2 -- libautoscoper/src/gpu/opencl/kernel/CMakeLists.txt | 1 - libautoscoper/tests/CMakeLists.txt | 1 - scripts/matlab/README.md | 2 +- scripts/python/README.md | 2 +- 33 files changed, 24 insertions(+), 34 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 7210e67f..e302f3af 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -18,4 +18,3 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 - uses: pre-commit/action@v3.0.0 - diff --git a/BUILD.md b/BUILD.md index 36188a1d..576717c0 100644 --- a/BUILD.md +++ b/BUILD.md @@ -67,4 +67,3 @@ _These instructions are untested and maybe obsolete._ 5. Run `docker build -t "autoscoper_dev_ubuntu:latest" -f ./UbuntuDockerFile .` 6. Find your IP address (using `ipconfig` on Windows or `ifconfig` on Unix) 7. Run `docker run --rm -it --gpus all -e DISPLAY=:0.0 --name autoscoper_ubuntu autoscoper_dev_ubuntu:latest` - diff --git a/CMake/ExternalProjectDependency.cmake b/CMake/ExternalProjectDependency.cmake index 24c30dac..73dc01ca 100644 --- a/CMake/ExternalProjectDependency.cmake +++ b/CMake/ExternalProjectDependency.cmake @@ -1131,4 +1131,4 @@ function(ExternalProject_AlwaysConfigure proj) DEPENDEES build ALWAYS 1 ) -endfunction() \ No newline at end of file +endfunction() diff --git a/CMake/FindFilesystem.cmake b/CMake/FindFilesystem.cmake index 4f51b53f..a152e522 100644 --- a/CMake/FindFilesystem.cmake +++ b/CMake/FindFilesystem.cmake @@ -245,4 +245,3 @@ set(Filesystem_FOUND ${_found} CACHE BOOL "TRUE if we can run a program using st if(Filesystem_FIND_REQUIRED AND NOT Filesystem_FOUND) message(FATAL_ERROR "Cannot run simple program using std::filesystem") endif() - diff --git a/CMake/PreventInSourceBuilds.cmake b/CMake/PreventInSourceBuilds.cmake index 224577a5..d5d68f6e 100644 --- a/CMake/PreventInSourceBuilds.cmake +++ b/CMake/PreventInSourceBuilds.cmake @@ -43,4 +43,4 @@ function(AssureOutOfSourceBuilds) endif() endfunction() -AssureOutOfSourceBuilds() \ No newline at end of file +AssureOutOfSourceBuilds() diff --git a/Documentation/adv-topics/index.md b/Documentation/adv-topics/index.md index 71a1bc22..f254d4cc 100644 --- a/Documentation/adv-topics/index.md +++ b/Documentation/adv-topics/index.md @@ -5,4 +5,4 @@ :caption: Contents remote-gpu-setup.md -``` \ No newline at end of file +``` diff --git a/Documentation/developer-guide/building-autoscoper.md b/Documentation/developer-guide/building-autoscoper.md index 916b8072..c0973cf9 100644 --- a/Documentation/developer-guide/building-autoscoper.md +++ b/Documentation/developer-guide/building-autoscoper.md @@ -1,2 +1,2 @@ ```{include} ../../BUILD.md -``` \ No newline at end of file +``` diff --git a/Documentation/developer-guide/contributing.md b/Documentation/developer-guide/contributing.md index e75758cf..ef6daa82 100644 --- a/Documentation/developer-guide/contributing.md +++ b/Documentation/developer-guide/contributing.md @@ -1,2 +1,2 @@ ```{include} ../../CONTRIBUTING.md -``` \ No newline at end of file +``` diff --git a/Documentation/file-specifications/config.md b/Documentation/file-specifications/config.md index 0f64c8a2..264c7827 100644 --- a/Documentation/file-specifications/config.md +++ b/Documentation/file-specifications/config.md @@ -113,4 +113,4 @@ VoxelSize 0.1 0.1 0.1 RenderResolution 512 512 OptimizationOffsets 0.1 0.1 0.1 0.1 0.1 0.1 -``` \ No newline at end of file +``` diff --git a/Documentation/file-specifications/index.md b/Documentation/file-specifications/index.md index 3048a984..760ab1a7 100644 --- a/Documentation/file-specifications/index.md +++ b/Documentation/file-specifications/index.md @@ -9,4 +9,4 @@ Below is a list of file specifications for various input and output files used b config.md camera-calibration.md filter-file.md -``` \ No newline at end of file +``` diff --git a/Documentation/get-help.md b/Documentation/get-help.md index a3cb38af..12e71ed2 100644 --- a/Documentation/get-help.md +++ b/Documentation/get-help.md @@ -23,4 +23,3 @@ If you cannot find a similar feature request, then write a post in the [SlicerAu ## I Would Like to share how Autoscoper helped me in my research Please send us the citation for your paper posting in the [SlicerAutoscoperM category](https://discourse.slicer.org/c/community/slicerautoscoperm/30) on the Slicer Discourse. We would love to hear how Autoscoper helped you in your research. - diff --git a/Documentation/socket-control-libraries/pyautoscoper.md b/Documentation/socket-control-libraries/pyautoscoper.md index 7e7a5015..d2cd1e02 100644 --- a/Documentation/socket-control-libraries/pyautoscoper.md +++ b/Documentation/socket-control-libraries/pyautoscoper.md @@ -196,4 +196,3 @@ It may be useful to launch Autoscoper from Python. This can be done by using the :undoc-members: :show-inheritance: ``` - diff --git a/Documentation/tutorials/tips-and-tricks.md b/Documentation/tutorials/tips-and-tricks.md index 6d08809c..928d034d 100644 --- a/Documentation/tutorials/tips-and-tricks.md +++ b/Documentation/tutorials/tips-and-tricks.md @@ -6,4 +6,4 @@ This tutorial contains a collection of tips and tricks for aligning partial volu To help align a partial volume, it may be beneficial to remove a degree of freedom, temporarily, from the translational movement. To do this, you need to rotate the partial volume until one of the axes is no longer visible when in translation mode. For example, if you want to remove the x-axis from the translation, you need to rotate the partial volume until the x-axis is no longer visible. This can be done by clicking and dragging on the partial volume in the 3D view. Once the axis is no longer visible, you can translate the partial volume in the x-axis without affecting the other axes. -![](https://github.com/BrownBiomechanics/Autoscoper/releases/download/docs-resources/autoscoper-tipsntricks-1.gif) \ No newline at end of file +![](https://github.com/BrownBiomechanics/Autoscoper/releases/download/docs-resources/autoscoper-tipsntricks-1.gif) diff --git a/autoscoper/src/ui/AboutAutoscoper.cpp b/autoscoper/src/ui/AboutAutoscoper.cpp index 7e5d0a9c..0f9ee957 100644 --- a/autoscoper/src/ui/AboutAutoscoper.cpp +++ b/autoscoper/src/ui/AboutAutoscoper.cpp @@ -82,4 +82,4 @@ AboutAutoscoper::AboutAutoscoper(QWidget* parent) AboutAutoscoper::~AboutAutoscoper() { delete about; -} \ No newline at end of file +} diff --git a/autoscoper/src/ui/FilterTreeWidgetParameter.h b/autoscoper/src/ui/FilterTreeWidgetParameter.h index f6bdb74d..96045189 100644 --- a/autoscoper/src/ui/FilterTreeWidgetParameter.h +++ b/autoscoper/src/ui/FilterTreeWidgetParameter.h @@ -71,4 +71,4 @@ public slots: void parameterChanged(); }; -#endif // FILTERTREEWIDGETPARAMETER_H \ No newline at end of file +#endif // FILTERTREEWIDGETPARAMETER_H diff --git a/autoscoper/src/ui/ImportExportTrackingOptionsDialog.cpp b/autoscoper/src/ui/ImportExportTrackingOptionsDialog.cpp index 4f524007..b0528e83 100644 --- a/autoscoper/src/ui/ImportExportTrackingOptionsDialog.cpp +++ b/autoscoper/src/ui/ImportExportTrackingOptionsDialog.cpp @@ -62,4 +62,4 @@ void ImportExportTrackingOptionsDialog::on_pushButton_OK_clicked() void ImportExportTrackingOptionsDialog::on_pushButton_Cancel_clicked() { this->reject(); -} \ No newline at end of file +} diff --git a/autoscoper/src/ui/NewTrialDialog.cpp b/autoscoper/src/ui/NewTrialDialog.cpp index 6fc03b44..06f922a7 100644 --- a/autoscoper/src/ui/NewTrialDialog.cpp +++ b/autoscoper/src/ui/NewTrialDialog.cpp @@ -243,4 +243,4 @@ bool NewTrialDialog::run() std::cerr << e.what() << std::endl; return false; } -} \ No newline at end of file +} diff --git a/autoscoper/src/ui/OpenCLPlatformSelectDialog.cpp b/autoscoper/src/ui/OpenCLPlatformSelectDialog.cpp index 365f18f3..0897d0d2 100644 --- a/autoscoper/src/ui/OpenCLPlatformSelectDialog.cpp +++ b/autoscoper/src/ui/OpenCLPlatformSelectDialog.cpp @@ -85,4 +85,4 @@ void OpenCLPlatformSelectDialog::on_pushButton_clicked() xromm::gpu::setUsedPlatform(diag->comboBox->currentIndex()); #endif this->close(); -} \ No newline at end of file +} diff --git a/autoscoper/src/ui/QtCategoryButton.cpp b/autoscoper/src/ui/QtCategoryButton.cpp index 90307456..dc3f6ba7 100644 --- a/autoscoper/src/ui/QtCategoryButton.cpp +++ b/autoscoper/src/ui/QtCategoryButton.cpp @@ -58,4 +58,4 @@ QtCategoryButton::QtCategoryButton(const QString& a_Text, QTreeWidget* a_pParent void QtCategoryButton::ButtonPressed() { m_pItem->setExpanded(!m_pItem->isExpanded()); -} \ No newline at end of file +} diff --git a/autoscoper/src/ui/QtCategoryButton.h b/autoscoper/src/ui/QtCategoryButton.h index de8afdec..2f9ca6b1 100644 --- a/autoscoper/src/ui/QtCategoryButton.h +++ b/autoscoper/src/ui/QtCategoryButton.h @@ -61,4 +61,4 @@ private slots: QTreeWidgetItem* m_pItem; }; -#endif // QTCATEGORYBUTTON_H \ No newline at end of file +#endif // QTCATEGORYBUTTON_H diff --git a/autoscoper/src/ui/TrackingOptionsDialog.cpp b/autoscoper/src/ui/TrackingOptionsDialog.cpp index 42b7e5e2..a747d26f 100644 --- a/autoscoper/src/ui/TrackingOptionsDialog.cpp +++ b/autoscoper/src/ui/TrackingOptionsDialog.cpp @@ -303,4 +303,4 @@ void TrackingOptionsDialog::on_radioButton_SplineInterpolation_clicked(bool chec AutoscoperMainWindow* mainwindow = dynamic_cast(parent()); mainwindow->getTracker()->trial()->guess = 3; -} \ No newline at end of file +} diff --git a/autoscoper/src/ui/VolumeBox.cpp b/autoscoper/src/ui/VolumeBox.cpp index 247e00cf..6432a0fd 100644 --- a/autoscoper/src/ui/VolumeBox.cpp +++ b/autoscoper/src/ui/VolumeBox.cpp @@ -63,4 +63,4 @@ void VolumeBox::on_toolButton_VolumeFile_clicked() if (fileName.isNull() == false) { widget->lineEdit_VolumeFile->setText(fileName); } -} \ No newline at end of file +} diff --git a/autoscoper/src/ui/VolumeListWidgetItem.cpp b/autoscoper/src/ui/VolumeListWidgetItem.cpp index 81b2ca68..c3cc90f0 100644 --- a/autoscoper/src/ui/VolumeListWidgetItem.cpp +++ b/autoscoper/src/ui/VolumeListWidgetItem.cpp @@ -56,4 +56,4 @@ void VolumeListWidgetItem::on_visiblilityCheckBox__toggled(bool checked) } } main_window_->volume_changed(); // update the volume -} \ No newline at end of file +} diff --git a/autoscoper/src/ui/WorldViewWindow.cpp b/autoscoper/src/ui/WorldViewWindow.cpp index 97a4218f..ecd1ec01 100644 --- a/autoscoper/src/ui/WorldViewWindow.cpp +++ b/autoscoper/src/ui/WorldViewWindow.cpp @@ -80,4 +80,4 @@ void WorldViewWindow::setSharedGLContext(QOpenGLContext* sharedContext) void WorldViewWindow::draw() { openGL->update(); -} \ No newline at end of file +} diff --git a/libautoscoper/src/Win32/dirent.h b/libautoscoper/src/Win32/dirent.h index a6f2d8b3..036d161f 100644 --- a/libautoscoper/src/Win32/dirent.h +++ b/libautoscoper/src/Win32/dirent.h @@ -886,4 +886,3 @@ dirent_set_errno( } #endif #endif /*DIRENT_H*/ - diff --git a/libautoscoper/src/gpu/cuda/ContrastFilter_kernels.h b/libautoscoper/src/gpu/cuda/ContrastFilter_kernels.h index ab0623d9..3d06e716 100644 --- a/libautoscoper/src/gpu/cuda/ContrastFilter_kernels.h +++ b/libautoscoper/src/gpu/cuda/ContrastFilter_kernels.h @@ -45,4 +45,4 @@ namespace xromm { namespace gpu { void contrast_filter_apply(const float* input, float* output, int width, int height, float alpha, float beta, int size); } -} // namespace xromm \ No newline at end of file +} // namespace xromm diff --git a/libautoscoper/src/gpu/cuda/Mult_kernels.h b/libautoscoper/src/gpu/cuda/Mult_kernels.h index 9cd2d08c..445cc3d6 100644 --- a/libautoscoper/src/gpu/cuda/Mult_kernels.h +++ b/libautoscoper/src/gpu/cuda/Mult_kernels.h @@ -45,4 +45,4 @@ namespace xromm { namespace gpu { void multiply(float* src1, float* src2, float* dest, size_t width, size_t height); } -} // namespace xromm \ No newline at end of file +} // namespace xromm diff --git a/libautoscoper/src/gpu/cuda/PSO_kernel.cu b/libautoscoper/src/gpu/cuda/PSO_kernel.cu index d5412998..e8fd2d81 100644 --- a/libautoscoper/src/gpu/cuda/PSO_kernel.cu +++ b/libautoscoper/src/gpu/cuda/PSO_kernel.cu @@ -142,4 +142,4 @@ cudaFree(devVel); cudaFree(devPBest); cudaFree(devGBest); } -* / \ No newline at end of file +* / diff --git a/libautoscoper/src/gpu/opencl/CMakeLists.txt b/libautoscoper/src/gpu/opencl/CMakeLists.txt index 34972b66..b2ee6751 100644 --- a/libautoscoper/src/gpu/opencl/CMakeLists.txt +++ b/libautoscoper/src/gpu/opencl/CMakeLists.txt @@ -31,5 +31,3 @@ set(opencl_SOURCES src/gpu/opencl/DRRBackground.cpp src/gpu/opencl/Mult.cpp ) - - diff --git a/libautoscoper/src/gpu/opencl/kernel/CMakeLists.txt b/libautoscoper/src/gpu/opencl/kernel/CMakeLists.txt index 3ef20264..446333d9 100644 --- a/libautoscoper/src/gpu/opencl/kernel/CMakeLists.txt +++ b/libautoscoper/src/gpu/opencl/kernel/CMakeLists.txt @@ -37,4 +37,3 @@ endforeach() add_custom_target(${SHADER_TO_HEADER} DEPENDS ${GENERATED_LIST}) set(opencl_shaders_src ${GENERATED_LIST} PARENT_SCOPE) - diff --git a/libautoscoper/tests/CMakeLists.txt b/libautoscoper/tests/CMakeLists.txt index 0622467e..b81d4218 100644 --- a/libautoscoper/tests/CMakeLists.txt +++ b/libautoscoper/tests/CMakeLists.txt @@ -16,4 +16,3 @@ if(WIN32) # The xromm::filesystem::relative compatibility function is not expected to work on Windows set_tests_properties(TestFileSystemCompat PROPERTIES WILL_FAIL TRUE) endif() - diff --git a/scripts/matlab/README.md b/scripts/matlab/README.md index 196a945f..123c3ca8 100644 --- a/scripts/matlab/README.md +++ b/scripts/matlab/README.md @@ -303,4 +303,4 @@ This function has the following parameters: connection.closeConnection(); ``` -This will close the connection to the server. \ No newline at end of file +This will close the connection to the server. diff --git a/scripts/python/README.md b/scripts/python/README.md index c64cdd10..0ca1e78f 100644 --- a/scripts/python/README.md +++ b/scripts/python/README.md @@ -1,3 +1,3 @@ # PyAutoscoper -Documentation for the Python API can be found on [Read the Docs](https://autoscoper.readthedocs.io/en/latest/socket-control-libraries/pyautoscoper.html). \ No newline at end of file +Documentation for the Python API can be found on [Read the Docs](https://autoscoper.readthedocs.io/en/latest/socket-control-libraries/pyautoscoper.html).