Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
e795818b
Commit
e795818b
authored
May 04, 2011
by
Sebastian Eichelbaum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CHANGE] - renamed WMatrixXX_2 to WMAtrixXX and WVectorXX_2 to WVectorXX.
parent
df11a218
Changes
206
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
206 changed files
with
1854 additions
and
1862 deletions
+1854
-1862
src/common/WPropertyTypes.h
src/common/WPropertyTypes.h
+3
-3
src/common/datastructures/WFiber.cpp
src/common/datastructures/WFiber.cpp
+1
-1
src/common/datastructures/WFiber.h
src/common/datastructures/WFiber.h
+2
-2
src/common/datastructures/test/WFiber_test.h
src/common/datastructures/test/WFiber_test.h
+17
-17
src/common/math/WGeometryFunctions.cpp
src/common/math/WGeometryFunctions.cpp
+18
-18
src/common/math/WGeometryFunctions.h
src/common/math/WGeometryFunctions.h
+1
-1
src/common/math/WLine.cpp
src/common/math/WLine.cpp
+12
-12
src/common/math/WLine.h
src/common/math/WLine.h
+4
-4
src/common/math/WLinearAlgebraFunctions.cpp
src/common/math/WLinearAlgebraFunctions.cpp
+8
-8
src/common/math/WLinearAlgebraFunctions.h
src/common/math/WLinearAlgebraFunctions.h
+4
-4
src/common/math/WMath.cpp
src/common/math/WMath.cpp
+10
-11
src/common/math/WMath.h
src/common/math/WMath.h
+5
-6
src/common/math/WMatrix.h
src/common/math/WMatrix.h
+8
-8
src/common/math/WPlane.cpp
src/common/math/WPlane.cpp
+19
-20
src/common/math/WPlane.h
src/common/math/WPlane.h
+21
-22
src/common/math/WSymmetricSphericalHarmonic.cpp
src/common/math/WSymmetricSphericalHarmonic.cpp
+3
-3
src/common/math/WSymmetricSphericalHarmonic.h
src/common/math/WSymmetricSphericalHarmonic.h
+6
-3
src/common/math/WTensorFunctions.h
src/common/math/WTensorFunctions.h
+4
-4
src/common/math/WUnitSphereCoordinates.cpp
src/common/math/WUnitSphereCoordinates.cpp
+3
-3
src/common/math/WUnitSphereCoordinates.h
src/common/math/WUnitSphereCoordinates.h
+2
-2
src/common/math/linearAlgebra/CMakeLists.txt
src/common/math/linearAlgebra/CMakeLists.txt
+1
-1
src/common/math/linearAlgebra/WMatrixFixed.h
src/common/math/linearAlgebra/WMatrixFixed.h
+6
-6
src/common/math/linearAlgebra/WMatrixInitializers.h
src/common/math/linearAlgebra/WMatrixInitializers.h
+15
-15
src/common/math/linearAlgebra/WPosition.h
src/common/math/linearAlgebra/WPosition.h
+5
-8
src/common/math/linearAlgebra/WVectorFixed.h
src/common/math/linearAlgebra/WVectorFixed.h
+12
-12
src/common/math/linearAlgebra/test/WMatrixFixed_test.h
src/common/math/linearAlgebra/test/WMatrixFixed_test.h
+6
-6
src/common/math/test/WLine_test.h
src/common/math/test/WLine_test.h
+103
-103
src/common/math/test/WLinearAlgebraFunctions_test.h
src/common/math/test/WLinearAlgebraFunctions_test.h
+9
-9
src/common/math/test/WMath_test.h
src/common/math/test/WMath_test.h
+65
-65
src/common/math/test/WPlane_test.h
src/common/math/test/WPlane_test.h
+23
-23
src/common/math/test/WPositionTraits.h
src/common/math/test/WPositionTraits.h
+5
-5
src/common/math/test/WSymmetricSphericalHarmonic_test.h
src/common/math/test/WSymmetricSphericalHarmonic_test.h
+10
-11
src/common/math/test/WTensorFunctions_test.h
src/common/math/test/WTensorFunctions_test.h
+7
-7
src/common/math/test/WVector3dTraits.h
src/common/math/test/WVector3dTraits.h
+4
-4
src/common/test/WBoundingBox_test.h
src/common/test/WBoundingBox_test.h
+5
-5
src/dataHandler/WDataSetFibers.cpp
src/dataHandler/WDataSetFibers.cpp
+10
-10
src/dataHandler/WDataSetFibers.h
src/dataHandler/WDataSetFibers.h
+2
-2
src/dataHandler/WDataSetRawHARDI.cpp
src/dataHandler/WDataSetRawHARDI.cpp
+3
-3
src/dataHandler/WDataSetRawHARDI.h
src/dataHandler/WDataSetRawHARDI.h
+4
-4
src/dataHandler/WDataSetScalar.cpp
src/dataHandler/WDataSetScalar.cpp
+2
-2
src/dataHandler/WDataSetScalar.h
src/dataHandler/WDataSetScalar.h
+1
-1
src/dataHandler/WDataSetSphericalHarmonics.cpp
src/dataHandler/WDataSetSphericalHarmonics.cpp
+2
-3
src/dataHandler/WDataSetSphericalHarmonics.h
src/dataHandler/WDataSetSphericalHarmonics.h
+8
-1
src/dataHandler/WDataSetTimeSeries.h
src/dataHandler/WDataSetTimeSeries.h
+2
-2
src/dataHandler/WDataSetVector.cpp
src/dataHandler/WDataSetVector.cpp
+8
-8
src/dataHandler/WDataSetVector.h
src/dataHandler/WDataSetVector.h
+4
-4
src/dataHandler/WDataTexture3D_2.cpp
src/dataHandler/WDataTexture3D_2.cpp
+3
-3
src/dataHandler/WEEG.cpp
src/dataHandler/WEEG.cpp
+2
-2
src/dataHandler/WEEG.h
src/dataHandler/WEEG.h
+5
-5
src/dataHandler/WEEGChannelInfo.cpp
src/dataHandler/WEEGChannelInfo.cpp
+1
-1
src/dataHandler/WEEGChannelInfo.h
src/dataHandler/WEEGChannelInfo.h
+2
-2
src/dataHandler/WEEGPositionsLibrary.cpp
src/dataHandler/WEEGPositionsLibrary.cpp
+4
-4
src/dataHandler/WEEGPositionsLibrary.h
src/dataHandler/WEEGPositionsLibrary.h
+3
-3
src/dataHandler/WFiberAccumulator.cpp
src/dataHandler/WFiberAccumulator.cpp
+1
-1
src/dataHandler/WFiberAccumulator.h
src/dataHandler/WFiberAccumulator.h
+1
-1
src/dataHandler/WGridRegular3D.cpp
src/dataHandler/WGridRegular3D.cpp
+37
-37
src/dataHandler/WGridRegular3D.h
src/dataHandler/WGridRegular3D.h
+34
-35
src/dataHandler/WGridTransformOrtho.cpp
src/dataHandler/WGridTransformOrtho.cpp
+26
-26
src/dataHandler/WGridTransformOrtho.h
src/dataHandler/WGridTransformOrtho.h
+17
-18
src/dataHandler/WThreadedTrackingFunction.cpp
src/dataHandler/WThreadedTrackingFunction.cpp
+13
-13
src/dataHandler/WThreadedTrackingFunction.h
src/dataHandler/WThreadedTrackingFunction.h
+6
-6
src/dataHandler/WTractAdapter.cpp
src/dataHandler/WTractAdapter.cpp
+3
-3
src/dataHandler/WTractAdapter.h
src/dataHandler/WTractAdapter.h
+4
-4
src/dataHandler/WValueSet.h
src/dataHandler/WValueSet.h
+3
-3
src/dataHandler/datastructures/WFiberCluster.cpp
src/dataHandler/datastructures/WFiberCluster.cpp
+8
-8
src/dataHandler/datastructures/test/WFiberCluster_test.h
src/dataHandler/datastructures/test/WFiberCluster_test.h
+91
-91
src/dataHandler/io/WReaderEEG.cpp
src/dataHandler/io/WReaderEEG.cpp
+1
-1
src/dataHandler/io/WReaderELC.cpp
src/dataHandler/io/WReaderELC.cpp
+4
-4
src/dataHandler/io/WReaderNIfTI.cpp
src/dataHandler/io/WReaderNIfTI.cpp
+1
-1
src/dataHandler/io/WWriterFiberVTK.cpp
src/dataHandler/io/WWriterFiberVTK.cpp
+1
-1
src/dataHandler/test/WDataSetFiberVector_test.h
src/dataHandler/test/WDataSetFiberVector_test.h
+8
-8
src/dataHandler/test/WDataSetScalar_test.h
src/dataHandler/test/WDataSetScalar_test.h
+10
-10
src/dataHandler/test/WDataSetTimeSeries_test.h
src/dataHandler/test/WDataSetTimeSeries_test.h
+1
-1
src/dataHandler/test/WDataSetVector_test.h
src/dataHandler/test/WDataSetVector_test.h
+31
-31
src/dataHandler/test/WGridRegular3D_test.h
src/dataHandler/test/WGridRegular3D_test.h
+57
-57
src/dataHandler/test/WGridTransformOrtho_test.h
src/dataHandler/test/WGridTransformOrtho_test.h
+41
-41
src/dataHandler/test/WGrid_test.h
src/dataHandler/test/WGrid_test.h
+1
-1
src/dataHandler/test/WThreadedTrackingFunction_test.h
src/dataHandler/test/WThreadedTrackingFunction_test.h
+61
-61
src/graphicsEngine/WGEColormapping.cpp
src/graphicsEngine/WGEColormapping.cpp
+3
-3
src/graphicsEngine/WGEColormapping.h
src/graphicsEngine/WGEColormapping.h
+3
-3
src/graphicsEngine/WGEGeodeUtils.h
src/graphicsEngine/WGEGeodeUtils.h
+11
-11
src/graphicsEngine/WGEGeometryUtils.cpp
src/graphicsEngine/WGEGeometryUtils.cpp
+9
-9
src/graphicsEngine/WGEGeometryUtils.h
src/graphicsEngine/WGEGeometryUtils.h
+4
-4
src/graphicsEngine/WGETexture.h
src/graphicsEngine/WGETexture.h
+1
-1
src/graphicsEngine/WGEUtils.cpp
src/graphicsEngine/WGEUtils.cpp
+2
-2
src/graphicsEngine/WGEUtils.h
src/graphicsEngine/WGEUtils.h
+5
-5
src/graphicsEngine/WPickHandler.cpp
src/graphicsEngine/WPickHandler.cpp
+6
-6
src/graphicsEngine/WPickInfo.h
src/graphicsEngine/WPickInfo.h
+14
-14
src/graphicsEngine/WROIBox.cpp
src/graphicsEngine/WROIBox.cpp
+12
-12
src/graphicsEngine/WROIBox.h
src/graphicsEngine/WROIBox.h
+8
-8
src/graphicsEngine/WROISphere.cpp
src/graphicsEngine/WROISphere.cpp
+18
-18
src/graphicsEngine/WROISphere.h
src/graphicsEngine/WROISphere.h
+12
-12
src/graphicsEngine/WTriangleMesh.cpp
src/graphicsEngine/WTriangleMesh.cpp
+6
-6
src/graphicsEngine/WTriangleMesh.h
src/graphicsEngine/WTriangleMesh.h
+4
-4
src/graphicsEngine/algorithms/WMarchingCubesAlgorithm.h
src/graphicsEngine/algorithms/WMarchingCubesAlgorithm.h
+2
-2
src/graphicsEngine/algorithms/WMarchingLegoAlgorithm.cpp
src/graphicsEngine/algorithms/WMarchingLegoAlgorithm.cpp
+2
-2
src/graphicsEngine/algorithms/WMarchingLegoAlgorithm.h
src/graphicsEngine/algorithms/WMarchingLegoAlgorithm.h
+2
-2
src/graphicsEngine/geodes/WGEGridNode.cpp
src/graphicsEngine/geodes/WGEGridNode.cpp
+1
-1
src/graphicsEngine/shaders/WGEPropertyUniform.h
src/graphicsEngine/shaders/WGEPropertyUniform.h
+1
-1
src/graphicsEngine/shaders/WGEUniformTypeTraits.h
src/graphicsEngine/shaders/WGEUniformTypeTraits.h
+2
-2
src/graphicsEngine/test/WGEGeometryUtils_test.h
src/graphicsEngine/test/WGEGeometryUtils_test.h
+5
-5
src/graphicsEngine/test/WROIBox_test.h
src/graphicsEngine/test/WROIBox_test.h
+2
-2
src/graphicsEngine/test/WTriangleMesh_test.h
src/graphicsEngine/test/WTriangleMesh_test.h
+61
-61
src/gui/qt4/WMainWindow.cpp
src/gui/qt4/WMainWindow.cpp
+3
-3
src/gui/qt4/controlPanel/WPropertyPositionWidget.cpp
src/gui/qt4/controlPanel/WPropertyPositionWidget.cpp
+2
-2
src/gui/qt4/controlPanel/WPropertyPositionWidget.h
src/gui/qt4/controlPanel/WPropertyPositionWidget.h
+1
-1
src/kernel/WCrosshair.cpp
src/kernel/WCrosshair.cpp
+2
-2
src/kernel/WCrosshair.h
src/kernel/WCrosshair.h
+3
-3
src/kernel/WSelectionManager.cpp
src/kernel/WSelectionManager.cpp
+3
-3
src/kernel/modules/navSlices/WMNavSlices.cpp
src/kernel/modules/navSlices/WMNavSlices.cpp
+42
-42
src/kernel/modules/navSlices/WMNavSlices.h
src/kernel/modules/navSlices/WMNavSlices.h
+1
-1
src/modules/HARDIToSphericalHarmonics/WMHARDIToSphericalHarmonics.cpp
...HARDIToSphericalHarmonics/WMHARDIToSphericalHarmonics.cpp
+4
-4
src/modules/HARDIToSphericalHarmonics/WSphericalHarmonicsCoefficientsThread.h
...phericalHarmonics/WSphericalHarmonicsCoefficientsThread.h
+1
-1
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
src/modules/arbitraryPlane/WMArbitraryPlane.cpp
+24
-24
src/modules/arbitraryPlane/WMArbitraryPlane.h
src/modules/arbitraryPlane/WMArbitraryPlane.h
+4
-4
src/modules/arbitraryRois/WMArbitraryRois.cpp
src/modules/arbitraryRois/WMArbitraryRois.cpp
+3
-3
src/modules/bermanTracking/WMBermanTracking.cpp
src/modules/bermanTracking/WMBermanTracking.cpp
+16
-16
src/modules/bermanTracking/WMBermanTracking.h
src/modules/bermanTracking/WMBermanTracking.h
+4
-4
src/modules/calculateGFA/WMCalculateGFA.cpp
src/modules/calculateGFA/WMCalculateGFA.cpp
+1
-1
src/modules/calculateTensors/WMCalculateTensors.cpp
src/modules/calculateTensors/WMCalculateTensors.cpp
+6
-6
src/modules/clusterSlicer/WMClusterSlicer.cpp
src/modules/clusterSlicer/WMClusterSlicer.cpp
+14
-14
src/modules/clusterSlicer/WMClusterSlicer.h
src/modules/clusterSlicer/WMClusterSlicer.h
+5
-5
src/modules/coordinateSystem/WCoordConverter.cpp
src/modules/coordinateSystem/WCoordConverter.cpp
+14
-14
src/modules/coordinateSystem/WCoordConverter.h
src/modules/coordinateSystem/WCoordConverter.h
+13
-14
src/modules/coordinateSystem/WMCoordinateSystem.cpp
src/modules/coordinateSystem/WMCoordinateSystem.cpp
+42
-42
src/modules/coordinateSystem/WRulerOrtho.cpp
src/modules/coordinateSystem/WRulerOrtho.cpp
+36
-36
src/modules/coordinateSystem/WRulerOrtho.h
src/modules/coordinateSystem/WRulerOrtho.h
+2
-2
src/modules/coordinateSystem/WTalairachConverter.cpp
src/modules/coordinateSystem/WTalairachConverter.cpp
+42
-42
src/modules/coordinateSystem/WTalairachConverter.h
src/modules/coordinateSystem/WTalairachConverter.h
+35
-35
src/modules/coordinateSystem/test/WTalairachConverter_test.h
src/modules/coordinateSystem/test/WTalairachConverter_test.h
+17
-17
src/modules/dataTypeConversion/WMDataTypeConversion.cpp
src/modules/dataTypeConversion/WMDataTypeConversion.cpp
+0
-1
src/modules/datasetManipulator/WMDatasetManipulator.cpp
src/modules/datasetManipulator/WMDatasetManipulator.cpp
+17
-17
src/modules/datasetManipulator/WMDatasetManipulator.h
src/modules/datasetManipulator/WMDatasetManipulator.h
+19
-19
src/modules/datasetProfile/WMDatasetProfile.cpp
src/modules/datasetProfile/WMDatasetProfile.cpp
+11
-11
src/modules/datasetProfile/WMDatasetProfile.h
src/modules/datasetProfile/WMDatasetProfile.h
+1
-1
src/modules/deterministicFTMori/WMDeterministicFTMori.cpp
src/modules/deterministicFTMori/WMDeterministicFTMori.cpp
+6
-6
src/modules/deterministicFTMori/WMDeterministicFTMori.h
src/modules/deterministicFTMori/WMDeterministicFTMori.h
+3
-3
src/modules/directVolumeRendering/WMDirectVolumeRendering.cpp
...modules/directVolumeRendering/WMDirectVolumeRendering.cpp
+3
-3
src/modules/eegView/WEEGSourceCalculator.cpp
src/modules/eegView/WEEGSourceCalculator.cpp
+2
-2
src/modules/eegView/WEEGSourceCalculator.h
src/modules/eegView/WEEGSourceCalculator.h
+1
-1
src/modules/eegView/WMEEGView.cpp
src/modules/eegView/WMEEGView.cpp
+5
-5
src/modules/effectiveConnectivityCluster/WMEffectiveConnectivityCluster.h
...ctiveConnectivityCluster/WMEffectiveConnectivityCluster.h
+2
-2
src/modules/exportGeometry/WMExportGeometry.cpp
src/modules/exportGeometry/WMExportGeometry.cpp
+1
-1
src/modules/fiberDisplay/WMFiberDisplay.cpp
src/modules/fiberDisplay/WMFiberDisplay.cpp
+3
-3
src/modules/fiberDisplaySimple/WMFiberDisplaySimple.cpp
src/modules/fiberDisplaySimple/WMFiberDisplaySimple.cpp
+4
-4
src/modules/fiberSelection/WMFiberSelection.cpp
src/modules/fiberSelection/WMFiberSelection.cpp
+2
-2
src/modules/fiberTransform/WMFiberTransform.cpp
src/modules/fiberTransform/WMFiberTransform.cpp
+6
-6
src/modules/gaussFiltering/WMGaussFiltering.cpp
src/modules/gaussFiltering/WMGaussFiltering.cpp
+0
-1
src/modules/gaussProcesses/WDataSetGP.cpp
src/modules/gaussProcesses/WDataSetGP.cpp
+1
-1
src/modules/gaussProcesses/WDataSetGP.h
src/modules/gaussProcesses/WDataSetGP.h
+1
-1
src/modules/gaussProcesses/WGaussProcess.cpp
src/modules/gaussProcesses/WGaussProcess.cpp
+2
-2
src/modules/gaussProcesses/WGaussProcess.h
src/modules/gaussProcesses/WGaussProcess.h
+6
-6
src/modules/gaussProcesses/gpView/WMGpView.cpp
src/modules/gaussProcesses/gpView/WMGpView.cpp
+3
-3
src/modules/gaussProcesses/test/WGaussProcess_test.h
src/modules/gaussProcesses/test/WGaussProcess_test.h
+20
-20
src/modules/gridRenderer/WMGridRenderer.cpp
src/modules/gridRenderer/WMGridRenderer.cpp
+0
-1
src/modules/isosurfaceRaytracer/WMIsosurfaceRaytracer.cpp
src/modules/isosurfaceRaytracer/WMIsosurfaceRaytracer.cpp
+3
-3
src/modules/lic/fantom/FTensor.h
src/modules/lic/fantom/FTensor.h
+1
-1
src/modules/lic/fantom/FTensor.icc
src/modules/lic/fantom/FTensor.icc
+1
-1
src/modules/lic/fibernavigator/TensorField.cpp
src/modules/lic/fibernavigator/TensorField.cpp
+1
-1
src/modules/lic/fibernavigator/triangleMesh.cpp
src/modules/lic/fibernavigator/triangleMesh.cpp
+1
-1
src/modules/lineGuidedSlice/WMLineGuidedSlice.cpp
src/modules/lineGuidedSlice/WMLineGuidedSlice.cpp
+8
-8
src/modules/lineGuidedSlice/WMLineGuidedSlice.h
src/modules/lineGuidedSlice/WMLineGuidedSlice.h
+1
-1
src/modules/marchingCubes/WMMarchingCubes.cpp
src/modules/marchingCubes/WMMarchingCubes.cpp
+2
-2
src/modules/navigationSlices/WMNavigationSlices.cpp
src/modules/navigationSlices/WMNavigationSlices.cpp
+4
-4
src/modules/navigationSlices/WMNavigationSlices.h
src/modules/navigationSlices/WMNavigationSlices.h
+1
-1
src/modules/overlayAtlas/WMOverlayAtlas.cpp
src/modules/overlayAtlas/WMOverlayAtlas.cpp
+12
-12
src/modules/overlayAtlas/WMOverlayAtlas.h
src/modules/overlayAtlas/WMOverlayAtlas.h
+5
-5
src/modules/paintTexture/WMPaintTexture.cpp
src/modules/paintTexture/WMPaintTexture.cpp
+2
-2
src/modules/probTractDisplaySP/WSPSliceGeodeBuilder.cpp
src/modules/probTractDisplaySP/WSPSliceGeodeBuilder.cpp
+2
-2
src/modules/readMesh/WMReadMesh.cpp
src/modules/readMesh/WMReadMesh.cpp
+2
-2
src/modules/scalarOperator/WMScalarOperator.cpp
src/modules/scalarOperator/WMScalarOperator.cpp
+0
-1
src/modules/scalarSegmentation/WSegmentationAlgoRegionGrowingConfidenceConnected.h
...ation/WSegmentationAlgoRegionGrowingConfidenceConnected.h
+1
-1
src/modules/sliceContext/WMSliceContext.cpp
src/modules/sliceContext/WMSliceContext.cpp
+5
-5
src/modules/sliceContext/WMSliceContext.h
src/modules/sliceContext/WMSliceContext.h
+1
-1
src/modules/sliceContext/WTransparentLinesDrawable.cpp
src/modules/sliceContext/WTransparentLinesDrawable.cpp
+5
-5
src/modules/splineSurface/WBSpline.cpp
src/modules/splineSurface/WBSpline.cpp
+10
-10
src/modules/splineSurface/WBSpline.h
src/modules/splineSurface/WBSpline.h
+8
-8
src/modules/splineSurface/WBSplineSurface.cpp
src/modules/splineSurface/WBSplineSurface.cpp
+11
-11
src/modules/splineSurface/WBSplineSurface.h
src/modules/splineSurface/WBSplineSurface.h
+7
-7
src/modules/splineSurface/WMSplineSurface.cpp
src/modules/splineSurface/WMSplineSurface.cpp
+4
-4
src/modules/splineSurface/WSurface.cpp
src/modules/splineSurface/WSurface.cpp
+22
-22
src/modules/splineSurface/WSurface.h
src/modules/splineSurface/WSurface.h
+6
-6
src/modules/superquadricGlyphs/WMSuperquadricGlyphs.cpp
src/modules/superquadricGlyphs/WMSuperquadricGlyphs.cpp
+1
-1
src/modules/teemGlyphs/WMTeemGlyphs.cpp
src/modules/teemGlyphs/WMTeemGlyphs.cpp
+4
-4
src/modules/template/WMTemplate.cpp
src/modules/template/WMTemplate.cpp
+2
-2
src/modules/vectorOperator/WMVectorOperator.cpp
src/modules/vectorOperator/WMVectorOperator.cpp
+24
-25
src/modules/vectorPlot/WMVectorPlot.cpp
src/modules/vectorPlot/WMVectorPlot.cpp
+3
-3
src/modules/vectorPlot/WMVectorPlot.h
src/modules/vectorPlot/WMVectorPlot.h
+2
-2
src/modules/voxelizer/WBresenham.cpp
src/modules/voxelizer/WBresenham.cpp
+7
-7
src/modules/voxelizer/WBresenham.h
src/modules/voxelizer/WBresenham.h
+3
-3
src/modules/voxelizer/WBresenhamDBL.cpp
src/modules/voxelizer/WBresenhamDBL.cpp
+2
-2
src/modules/voxelizer/WBresenhamDBL.h
src/modules/voxelizer/WBresenhamDBL.h
+1
-1
src/modules/voxelizer/WCenterlineParameterization.cpp
src/modules/voxelizer/WCenterlineParameterization.cpp
+3
-3
src/modules/voxelizer/WCenterlineParameterization.h
src/modules/voxelizer/WCenterlineParameterization.h
+3
-3
src/modules/voxelizer/WIntegrationParameterization.cpp
src/modules/voxelizer/WIntegrationParameterization.cpp
+3
-3
src/modules/voxelizer/WIntegrationParameterization.h
src/modules/voxelizer/WIntegrationParameterization.h
+3
-3
src/modules/voxelizer/WMVoxelizer.cpp
src/modules/voxelizer/WMVoxelizer.cpp
+4
-4
src/modules/voxelizer/WRasterAlgorithm.cpp
src/modules/voxelizer/WRasterAlgorithm.cpp
+3
-3
src/modules/voxelizer/WRasterAlgorithm.h
src/modules/voxelizer/WRasterAlgorithm.h
+3
-3
src/modules/voxelizer/WRasterParameterization.cpp
src/modules/voxelizer/WRasterParameterization.cpp
+1
-1
src/modules/voxelizer/WRasterParameterization.h
src/modules/voxelizer/WRasterParameterization.h
+3
-3
src/modules/voxelizer/test/WBresenhamDBL_test.h
src/modules/voxelizer/test/WBresenhamDBL_test.h
+21
-21
src/modules/voxelizer/test/WBresenham_test.h
src/modules/voxelizer/test/WBresenham_test.h
+21
-21
src/modules/writeMesh/WMWriteMesh.cpp
src/modules/writeMesh/WMWriteMesh.cpp
+1
-1
src/modules/writeMesh/test/WMWriteMesh_test.h
src/modules/writeMesh/test/WMWriteMesh_test.h
+1
-1
src/modules/writeNIfTI/WMWriteNIfTI.cpp
src/modules/writeNIfTI/WMWriteNIfTI.cpp
+0
-1
No files found.
src/common/WPropertyTypes.h
View file @
e795818b
...
...
@@ -105,9 +105,9 @@ namespace WPVBaseTypes
typedef
std
::
string
PV_STRING
;
//!< base type used for every WPVString
typedef
boost
::
filesystem
::
path
PV_PATH
;
//!< base type used for every WPVFilename
typedef
WItemSelector
PV_SELECTION
;
//!< base type used for every WPVSelection
typedef
WPosition
_2
PV_POSITION
;
//!< base type used for every WPVPosition
typedef
WPosition
PV_POSITION
;
//!< base type used for every WPVPosition
typedef
WColor
PV_COLOR
;
//!< base type used for every WPVColor
typedef
WMatrix4d
_2
PV_MATRIX4X4
;
//!< base type used for every WPVMatrix4X4
typedef
WMatrix4d
PV_MATRIX4X4
;
//!< base type used for every WPVMatrix4X4
/**
* Enum denoting the possible trigger states. It is used for trigger properties.
...
...
@@ -550,7 +550,7 @@ namespace PROPERTY_TYPE_HELPER
*/
WPVBaseTypes
::
PV_MATRIX4X4
create
(
const
WPVBaseTypes
::
PV_MATRIX4X4
&
/*old*/
,
const
std
::
string
str
)
{
WMatrix4d
_2
c
;
WMatrix4d
c
;
std
::
vector
<
std
::
string
>
tokens
;
tokens
=
string_utils
::
tokenize
(
str
,
";"
);
WAssert
(
tokens
.
size
()
>=
16
,
"There weren't 16 values for a 4x4 Matrix"
);
...
...
src/common/datastructures/WFiber.cpp
View file @
e795818b
...
...
@@ -85,7 +85,7 @@ namespace
}
}
WFiber
::
WFiber
(
const
std
::
vector
<
WPosition
_2
>
&
points
)
WFiber
::
WFiber
(
const
std
::
vector
<
WPosition
>
&
points
)
:
WLine
(
points
)
{
}
...
...
src/common/datastructures/WFiber.h
View file @
e795818b
...
...
@@ -41,11 +41,11 @@ class OWCOMMON_EXPORT WFiber : public WLine
friend
class
WFiberTest
;
public:
/**
* Constructs a new fiber out of WPosition
_2
s.
* Constructs a new fiber out of WPositions.
*
* \param points Reference to the points which belong to this fiber
*/
explicit
WFiber
(
const
std
::
vector
<
WPosition
_2
>
&
points
);
explicit
WFiber
(
const
std
::
vector
<
WPosition
>
&
points
);
/**
* Creates an empty fiber.
...
...
src/common/datastructures/test/WFiber_test.h
View file @
e795818b
...
...
@@ -41,16 +41,16 @@ class WFiberTest : public CxxTest::TestSuite
{
public:
/**
* Two fibers are equal if they have equal WPosition
_2
s in same order
* Two fibers are equal if they have equal WPositions in same order
*/
void
testEqualityOperator
(
void
)
{
WFiber
fib1
;
WFiber
fib2
;
fib1
.
push_back
(
WPosition
_2
(
1.2
,
3.4
,
5.6
)
);
fib1
.
push_back
(
WPosition
_2
(
7.8
,
9.0
,
-
1.2
)
);
fib2
.
push_back
(
WPosition
_2
(
1.2
,
3.4
,
5.6
)
);
fib2
.
push_back
(
WPosition
_2
(
7.8
,
9.0
,
-
1.2
)
);
fib1
.
push_back
(
WPosition
(
1.2
,
3.4
,
5.6
)
);
fib1
.
push_back
(
WPosition
(
7.8
,
9.0
,
-
1.2
)
);
fib2
.
push_back
(
WPosition
(
1.2
,
3.4
,
5.6
)
);
fib2
.
push_back
(
WPosition
(
7.8
,
9.0
,
-
1.2
)
);
TS_ASSERT_EQUALS
(
fib1
,
fib2
);
}
...
...
@@ -61,11 +61,11 @@ public:
void
testDLTisSymmetric
(
void
)
{
WFiber
q
;
q
.
push_back
(
WPosition
_2
(
0
,
1
,
0
)
);
q
.
push_back
(
WPosition
_2
(
0
,
0
,
0
)
);
q
.
push_back
(
WPosition
(
0
,
1
,
0
)
);
q
.
push_back
(
WPosition
(
0
,
0
,
0
)
);
WFiber
r
;
r
.
push_back
(
WPosition
_2
(
1
,
1
,
0
)
);
r
.
push_back
(
WPosition
_2
(
2
,
2
,
0
)
);
r
.
push_back
(
WPosition
(
1
,
1
,
0
)
);
r
.
push_back
(
WPosition
(
2
,
2
,
0
)
);
TS_ASSERT_EQUALS
(
WFiber
::
distDLT
(
1.0
,
q
,
r
),
std
::
sqrt
(
5.0
)
/
2.0
);
TS_ASSERT_EQUALS
(
WFiber
::
distDLT
(
1.0
,
r
,
q
),
std
::
sqrt
(
5.0
)
/
2.0
);
...
...
@@ -78,11 +78,11 @@ public:
void
testDSTisSymmetric
(
void
)
{
WFiber
q
;
q
.
push_back
(
WPosition
_2
(
0
,
1
,
0
)
);
q
.
push_back
(
WPosition
_2
(
0
,
0
,
0
)
);
q
.
push_back
(
WPosition
(
0
,
1
,
0
)
);
q
.
push_back
(
WPosition
(
0
,
0
,
0
)
);
WFiber
r
;
r
.
push_back
(
WPosition
_2
(
1
,
1
,
0
)
);
r
.
push_back
(
WPosition
_2
(
2
,
2
,
0
)
);
r
.
push_back
(
WPosition
(
1
,
1
,
0
)
);
r
.
push_back
(
WPosition
(
2
,
2
,
0
)
);
TS_ASSERT_EQUALS
(
WFiber
::
distDST
(
1.0
,
q
,
r
),
std
::
sqrt
(
2.0
)
/
2.0
);
TS_ASSERT_EQUALS
(
WFiber
::
distDST
(
1.0
,
r
,
q
),
std
::
sqrt
(
2.0
)
/
2.0
);
...
...
@@ -95,11 +95,11 @@ public:
void
testDTMeasure
(
void
)
{
WFiber
q
;
q
.
push_back
(
WPosition
_2
(
0
,
1
,
0
)
);
q
.
push_back
(
WPosition
_2
(
0
,
0
,
0
)
);
q
.
push_back
(
WPosition
(
0
,
1
,
0
)
);
q
.
push_back
(
WPosition
(
0
,
0
,
0
)
);
WFiber
r
;
r
.
push_back
(
WPosition
_2
(
1
,
1
,
0
)
);
r
.
push_back
(
WPosition
_2
(
2
,
2
,
0
)
);
r
.
push_back
(
WPosition
(
1
,
1
,
0
)
);
r
.
push_back
(
WPosition
(
2
,
2
,
0
)
);
TS_ASSERT_EQUALS
(
WFiber
::
distDST
(
1.0
,
q
,
r
),
std
::
sqrt
(
2.0
)
/
2.0
);
TS_ASSERT_EQUALS
(
WFiber
::
distDLT
(
1.0
,
q
,
r
),
std
::
sqrt
(
5.0
)
/
2.0
);
...
...
src/common/math/WGeometryFunctions.cpp
View file @
e795818b
...
...
@@ -27,7 +27,7 @@
#include "WGeometryFunctions.h"
void
tesselateIcosahedron
(
std
::
vector
<
WVector3d
_2
>*
vertices
,
std
::
vector
<
unsigned
int
>*
triangles
,
unsigned
int
level
)
void
tesselateIcosahedron
(
std
::
vector
<
WVector3d
>*
vertices
,
std
::
vector
<
unsigned
int
>*
triangles
,
unsigned
int
level
)
{
WAssert
(
vertices
,
"Missing input vector."
);
WAssert
(
triangles
,
"Missing input vector."
);
...
...
@@ -47,24 +47,24 @@ void tesselateIcosahedron( std::vector< WVector3d_2 >* vertices, std::vector< un
// add icosahedron vertices
double
phi
=
0.5
*
(
1.0
+
sqrt
(
5.0
)
);
std
::
vector
<
WVector3d
_2
>
g
;
std
::
vector
<
WVector3d
>
g
;
vertices
->
push_back
(
WVector3d
_2
(
phi
,
1
,
0
)
);
// 0
vertices
->
push_back
(
WVector3d
_2
(
-
phi
,
1
,
0
)
);
// 1
vertices
->
push_back
(
WVector3d
_2
(
phi
,
-
1
,
0
)
);
// 2
vertices
->
push_back
(
WVector3d
_2
(
-
phi
,
-
1
,
0
)
);
// 3
vertices
->
push_back
(
WVector3d
(
phi
,
1
,
0
)
);
// 0
vertices
->
push_back
(
WVector3d
(
-
phi
,
1
,
0
)
);
// 1
vertices
->
push_back
(
WVector3d
(
phi
,
-
1
,
0
)
);
// 2
vertices
->
push_back
(
WVector3d
(
-
phi
,
-
1
,
0
)
);
// 3
vertices
->
push_back
(
WVector3d
_2
(
1
,
0
,
phi
)
);
// 4
vertices
->
push_back
(
WVector3d
_2
(
-
1
,
0
,
phi
)
);
// 5
vertices
->
push_back
(
WVector3d
_2
(
1
,
0
,
-
phi
)
);
// 6
vertices
->
push_back
(
WVector3d
_2
(
-
1
,
0
,
-
phi
)
);
// 7
vertices
->
push_back
(
WVector3d
(
1
,
0
,
phi
)
);
// 4
vertices
->
push_back
(
WVector3d
(
-
1
,
0
,
phi
)
);
// 5
vertices
->
push_back
(
WVector3d
(
1
,
0
,
-
phi
)
);
// 6
vertices
->
push_back
(
WVector3d
(
-
1
,
0
,
-
phi
)
);
// 7
vertices
->
push_back
(
WVector3d
_2
(
0
,
phi
,
1
)
);
// 8
vertices
->
push_back
(
WVector3d
_2
(
0
,
-
phi
,
1
)
);
// 9
vertices
->
push_back
(
WVector3d
_2
(
0
,
phi
,
-
1
)
);
// 10
vertices
->
push_back
(
WVector3d
_2
(
0
,
-
phi
,
-
1
)
);
// 11
vertices
->
push_back
(
WVector3d
(
0
,
phi
,
1
)
);
// 8
vertices
->
push_back
(
WVector3d
(
0
,
-
phi
,
1
)
);
// 9
vertices
->
push_back
(
WVector3d
(
0
,
phi
,
-
1
)
);
// 10
vertices
->
push_back
(
WVector3d
(
0
,
-
phi
,
-
1
)
);
// 11
for
(
std
::
vector
<
WVector3d
_2
>::
iterator
it
=
vertices
->
begin
();
it
!=
vertices
->
end
();
++
it
)
for
(
std
::
vector
<
WVector3d
>::
iterator
it
=
vertices
->
begin
();
it
!=
vertices
->
end
();
++
it
)
{
*
it
=
normalize
(
*
it
);
}
...
...
@@ -111,9 +111,9 @@ void tesselateIcosahedron( std::vector< WVector3d_2 >* vertices, std::vector< un
utility
::
Edge
e
(
(
*
triangles
)[
3
*
k
+
i
],
(
*
triangles
)[
3
*
k
+
(
i
+
1
)
%
3
]
);
if
(
edgeVertices
.
find
(
e
)
==
edgeVertices
.
end
()
)
{
WVector3d
_2
v0
=
vertices
->
at
(
e
.
first
);
WVector3d
_2
v1
=
vertices
->
at
(
e
.
second
);
WVector3d
_2
v
=
v0
+
v1
;
WVector3d
v0
=
vertices
->
at
(
e
.
first
);
WVector3d
v1
=
vertices
->
at
(
e
.
second
);
WVector3d
v
=
v0
+
v1
;
v
=
normalize
(
v
);
vertices
->
push_back
(
v
);
edgeVertices
[
e
]
=
vertices
->
size
()
-
1
;
...
...
src/common/math/WGeometryFunctions.h
View file @
e795818b
...
...
@@ -87,6 +87,6 @@ namespace utility
* \param[out] triangles The resulting triangles as a list of indices into the vertex vector.
* \param level The tesselation level.
*/
void
OWCOMMON_EXPORT
tesselateIcosahedron
(
std
::
vector
<
WVector3d
_2
>*
vertices
,
std
::
vector
<
unsigned
int
>*
triangles
,
unsigned
int
level
);
void
OWCOMMON_EXPORT
tesselateIcosahedron
(
std
::
vector
<
WVector3d
>*
vertices
,
std
::
vector
<
unsigned
int
>*
triangles
,
unsigned
int
level
);
#endif // WGEOMETRYFUNCTIONS_H
src/common/math/WLine.cpp
View file @
e795818b
...
...
@@ -37,17 +37,17 @@
#include "WPolynomialEquationSolvers.h"
#include "linearAlgebra/WLinearAlgebra.h"
WLine
::
WLine
(
const
std
::
vector
<
WPosition
_2
>
&
points
)
:
WMixinVector
<
WPosition
_2
>
(
points
)
WLine
::
WLine
(
const
std
::
vector
<
WPosition
>
&
points
)
:
WMixinVector
<
WPosition
>
(
points
)
{
}
WLine
::
WLine
()
:
WMixinVector
<
WPosition
_2
>
()
:
WMixinVector
<
WPosition
>
()
{
}
const
WPosition
_2
&
midPoint
(
const
WLine
&
line
)
const
WPosition
&
midPoint
(
const
WLine
&
line
)
{
if
(
line
.
empty
()
)
{
...
...
@@ -92,7 +92,7 @@ void WLine::resampleByNumberOfPoints( size_t numPoints )
// TODO(math): fix numerical issuses: newSegmentLength may be wrong => great offset by many intraSegment sample points
// remainingLength may be wrong => ...
// Take a look at the unit test testNumericalStabilityOfResampling
WPosition
_2
newPoint
=
at
(
i
+
1
)
+
remainingLength
*
normalize
(
at
(
i
)
-
at
(
i
+
1
)
);
WPosition
newPoint
=
at
(
i
+
1
)
+
remainingLength
*
normalize
(
at
(
i
)
-
at
(
i
+
1
)
);
newLine
.
push_back
(
newPoint
);
// std::cout << "line size so far" << newLine.size() << " lenght so far: " << newLine.pathLength() << std::endl;
// std::cout << numPoints - newLine.size() << std::endl;
...
...
@@ -113,7 +113,7 @@ void WLine::resampleByNumberOfPoints( size_t numPoints )
}
if
(
size
()
!=
numPoints
)
{
this
->
WMixinVector
<
WPosition
_2
>::
operator
=
(
newLine
);
this
->
WMixinVector
<
WPosition
>::
operator
=
(
newLine
);
}
// Note if the size() == 0, then the resampled tract is also of length 0
}
...
...
@@ -137,7 +137,7 @@ void WLine::removeAdjacentDuplicates()
newLine
.
push_back
(
*
cit
);
}
}
this
->
WMixinVector
<
WPosition
_2
>::
operator
=
(
newLine
);
this
->
WMixinVector
<
WPosition
>::
operator
=
(
newLine
);
}
void
WLine
::
resampleBySegmentLength
(
double
newSegmentLength
)
...
...
@@ -155,7 +155,7 @@ void WLine::resampleBySegmentLength( double newSegmentLength )
{
if
(
length
(
newLine
.
back
()
-
(
*
this
)[
i
]
)
>
newSegmentLength
)
{
const
WPosition
_2
&
pred
=
(
*
this
)[
i
-
1
];
const
WPosition
&
pred
=
(
*
this
)[
i
-
1
];
if
(
pred
==
newLine
.
back
()
)
{
// Then there is no triangle and the old Segment Length is bigger as the new segment
...
...
@@ -185,7 +185,7 @@ void WLine::resampleBySegmentLength( double newSegmentLength )
// NOTE: if those asserts fire, then this algo is wrong and produces wrong results, and I've to search to bug!
WAssert
(
std
::
imag
(
solution
.
first
)
==
0.0
,
"Invalid quadratic equation while computing resamplingBySegmentLength"
);
WAssert
(
std
::
imag
(
solution
.
second
)
==
0.0
,
"Invalid quadratic equation while computing resamplingBySegmentLength"
);
WPosition
_2
pointOfIntersection
;
WPosition
pointOfIntersection
;
if
(
std
::
real
(
solution
.
first
)
>
0.0
)
{
pointOfIntersection
=
pred
+
std
::
real
(
solution
.
first
)
*
(
(
*
this
)[
i
]
-
pred
);
...
...
@@ -201,10 +201,10 @@ void WLine::resampleBySegmentLength( double newSegmentLength )
}
if
(
length
(
newLine
.
back
()
-
(
*
this
)[
size
()
-
1
]
)
>
newSegmentLength
/
2.0
)
{
WVector3d
_2
direction
=
normalize
(
(
*
this
)[
size
()
-
1
]
-
newLine
.
back
()
);
WVector3d
direction
=
normalize
(
(
*
this
)[
size
()
-
1
]
-
newLine
.
back
()
);
newLine
.
push_back
(
newLine
.
back
()
+
direction
*
newSegmentLength
);
}
this
->
WMixinVector
<
WPosition
_2
>::
operator
=
(
newLine
);
this
->
WMixinVector
<
WPosition
>::
operator
=
(
newLine
);
}
int
equalsDelta
(
const
WLine
&
line
,
const
WLine
&
other
,
double
delta
)
...
...
@@ -214,7 +214,7 @@ int equalsDelta( const WLine& line, const WLine& other, double delta )
bool
sameLines
=
true
;
for
(
diffPos
=
0
;
(
diffPos
<
pts
)
&&
sameLines
;
++
diffPos
)
{
for
(
int
x
=
0
;
x
<
3
;
++
x
)
// since WLine uses WPosition
_2
as elements there are 3 components per position
for
(
int
x
=
0
;
x
<
3
;
++
x
)
// since WLine uses WPosition as elements there are 3 components per position
{
sameLines
=
sameLines
&&
(
std
::
abs
(
line
[
diffPos
][
x
]
-
other
[
diffPos
][
x
]
)
<=
delta
);
}
...
...
src/common/math/WLine.h
View file @
e795818b
...
...
@@ -38,9 +38,9 @@
class
WLineTest
;
/**
* A line is an ordered sequence of WPosition
_2
s.
* A line is an ordered sequence of WPositions.
*/
class
OWCOMMON_EXPORT
WLine
:
public
WMixinVector
<
WPosition
_2
>
class
OWCOMMON_EXPORT
WLine
:
public
WMixinVector
<
WPosition
>
{
public:
/**
...
...
@@ -48,7 +48,7 @@ public:
*
* \param points Point sequence
*/
explicit
WLine
(
const
std
::
vector
<
WPosition
_2
>
&
points
);
explicit
WLine
(
const
std
::
vector
<
WPosition
>
&
points
);
/**
* Creates an empty line.
...
...
@@ -114,7 +114,7 @@ OWCOMMON_EXPORT double pathLength( const WLine& line );
*
* \return Const reference to the midpoint element.
*/
OWCOMMON_EXPORT
const
WPosition
_2
&
midPoint
(
const
WLine
&
line
);
OWCOMMON_EXPORT
const
WPosition
&
midPoint
(
const
WLine
&
line
);
/**
* Compares two lines with each other point wise upto a given delta.
...
...
src/common/math/WLinearAlgebraFunctions.cpp
View file @
e795818b
...
...
@@ -33,16 +33,16 @@
#include "WMatrix.h"
#include "linearAlgebra/WLinearAlgebra.h"
WVector3d
_2
multMatrixWithVector3D
(
WMatrix
<
double
>
mat
,
WVector3d_2
vec
)
WVector3d
multMatrixWithVector3D
(
WMatrix
<
double
>
mat
,
WVector3d
vec
)
{
WVector3d
_2
result
;
WVector3d
result
;
result
[
0
]
=
mat
(
0
,
0
)
*
vec
[
0
]
+
mat
(
0
,
1
)
*
vec
[
1
]
+
mat
(
0
,
2
)
*
vec
[
2
];
result
[
1
]
=
mat
(
1
,
0
)
*
vec
[
0
]
+
mat
(
1
,
1
)
*
vec
[
1
]
+
mat
(
1
,
2
)
*
vec
[
2
];
result
[
2
]
=
mat
(
2
,
0
)
*
vec
[
0
]
+
mat
(
2
,
1
)
*
vec
[
1
]
+
mat
(
2
,
2
)
*
vec
[
2
];
return
result
;
}
WVector3d
_2
transformVector3DWithMatrix4D
(
WMatrix
<
double
>
mat
,
WVector3d_2
vec
)
WVector3d
transformVector3DWithMatrix4D
(
WMatrix
<
double
>
mat
,
WVector3d
vec
)
{
WAssert
(
mat
.
getNbRows
()
==
4
&&
mat
.
getNbCols
()
==
4
,
"Matrix has wrong size."
);
std
::
vector
<
double
>
resultVec4D
(
4
);
...
...
@@ -51,14 +51,14 @@ WVector3d_2 transformVector3DWithMatrix4D( WMatrix<double> mat, WVector3d_2 vec
resultVec4D
[
2
]
=
mat
(
2
,
0
)
*
vec
[
0
]
+
mat
(
2
,
1
)
*
vec
[
1
]
+
mat
(
2
,
2
)
*
vec
[
2
]
/* + mat( 2, 3 ) * 0 */
;
resultVec4D
[
3
]
=
mat
(
3
,
0
)
*
vec
[
0
]
+
mat
(
3
,
1
)
*
vec
[
1
]
+
mat
(
3
,
2
)
*
vec
[
2
]
/* + mat( 3, 3 ) * 0 */
;
WVector3d
_2
result
;
WVector3d
result
;
result
[
0
]
=
resultVec4D
[
0
]
/
resultVec4D
[
3
];
result
[
1
]
=
resultVec4D
[
1
]
/
resultVec4D
[
3
];
result
[
2
]
=
resultVec4D
[
2
]
/
resultVec4D
[
3
];
return
result
;
}
WPosition
_2
transformPosition3DWithMatrix4D
(
WMatrix
<
double
>
mat
,
WPosition_2
vec
)
WPosition
transformPosition3DWithMatrix4D
(
WMatrix
<
double
>
mat
,
WPosition
vec
)
{
WAssert
(
mat
.
getNbRows
()
==
4
&&
mat
.
getNbCols
()
==
4
,
"Matrix has wrong size."
);
std
::
vector
<
double
>
resultVec4D
(
4
);
...
...
@@ -67,7 +67,7 @@ WPosition_2 transformPosition3DWithMatrix4D( WMatrix<double> mat, WPosition_2 ve
resultVec4D
[
2
]
=
mat
(
2
,
0
)
*
vec
[
0
]
+
mat
(
2
,
1
)
*
vec
[
1
]
+
mat
(
2
,
2
)
*
vec
[
2
]
+
mat
(
2
,
3
)
*
1
;
resultVec4D
[
3
]
=
mat
(
3
,
0
)
*
vec
[
0
]
+
mat
(
3
,
1
)
*
vec
[
1
]
+
mat
(
3
,
2
)
*
vec
[
2
]
+
mat
(
3
,
3
)
*
1
;
WPosition
_2
result
;
WPosition
result
;
result
[
0
]
=
resultVec4D
[
0
]
/
resultVec4D
[
3
];
result
[
1
]
=
resultVec4D
[
1
]
/
resultVec4D
[
3
];
result
[
2
]
=
resultVec4D
[
2
]
/
resultVec4D
[
3
];
...
...
@@ -283,9 +283,9 @@ WMatrix<double> invertMatrix4x4( WMatrix<double> mat )
return
result
;
}
bool
linearIndependent
(
const
WVector3d
_2
&
u
,
const
WVector3d_2
&
v
)
bool
linearIndependent
(
const
WVector3d
&
u
,
const
WVector3d
&
v
)
{
WVector3d
_2
cp
=
cross
(
u
,
v
);
WVector3d
cp
=
cross
(
u
,
v
);
if
(
std
::
fabs
(
cp
[
0
]
)
<
wlimits
::
DBL_EPS
&&
std
::
fabs
(
cp
[
1
]
)
<
wlimits
::
DBL_EPS
&&
std
::
fabs
(
cp
[
2
]
)
<
wlimits
::
DBL_EPS
)
{
return
false
;
...
...
src/common/math/WLinearAlgebraFunctions.h
View file @
e795818b
...
...
@@ -37,7 +37,7 @@ template< typename > class WMatrix;
* \param mat 3x3 matrix
* \param vec vector
*/
WVector3d
_2
OWCOMMON_EXPORT
multMatrixWithVector3D
(
WMatrix
<
double
>
mat
,
WVector3d_2
vec
);
WVector3d
OWCOMMON_EXPORT
multMatrixWithVector3D
(
WMatrix
<
double
>
mat
,
WVector3d
vec
);
/**
* Applies a coordinate transformation in homogenous coordinates to a vector.
...
...
@@ -46,7 +46,7 @@ WVector3d_2 OWCOMMON_EXPORT multMatrixWithVector3D( WMatrix<double> mat, WVector
* \param mat 4x4 matrix
* \param vec vector
*/
WVector3d
_2
OWCOMMON_EXPORT
transformVector3DWithMatrix4D
(
WMatrix
<
double
>
mat
,
WVector3d_2
vec
);
WVector3d
OWCOMMON_EXPORT
transformVector3DWithMatrix4D
(
WMatrix
<
double
>
mat
,
WVector3d
vec
);
/**
* Applies a coordinate transformation in homogenous coordinates to a position.
...
...
@@ -55,7 +55,7 @@ WVector3d_2 OWCOMMON_EXPORT transformVector3DWithMatrix4D( WMatrix<double> mat,
* \param mat 4x4 matrix
* \param vec vector
*/
WPosition
_2
OWCOMMON_EXPORT
transformPosition3DWithMatrix4D
(
WMatrix
<
double
>
mat
,
WPosition_2
vec
);
WPosition
OWCOMMON_EXPORT
transformPosition3DWithMatrix4D
(
WMatrix
<
double
>
mat
,
WPosition
vec
);
/**
* helper routine to invert a 3x3 matrix
...
...
@@ -85,7 +85,7 @@ WMatrix<double> OWCOMMON_EXPORT invertMatrix4x4( WMatrix<double> mat );
*
* \note This check is performed with the cross product != (0,0,0) but in numerical stability with FLT_EPS.
*/
bool
OWCOMMON_EXPORT
linearIndependent
(
const
WVector3d
_2
&
u
,
const
WVector3d_2
&
v
);
bool
OWCOMMON_EXPORT
linearIndependent
(
const
WVector3d
&
u
,
const
WVector3d
&
v
);
/**
* Computes the SVD for the Matrix \param A
...
...
src/common/math/WMath.cpp
View file @
e795818b
...
...
@@ -25,14 +25,13 @@
#include "WMath.h"
#include "WPlane.h"
#include "linearAlgebra/WLinearAlgebra.h"
#include "linearAlgebra/WLinearAlgebra.h"
#include "../WAssert.h"
#include "../WLimits.h"
bool
testIntersectTriangle
(
const
WPosition
_2
&
p1
,
const
WPosition_2
&
p2
,
const
WPosition_2
&
p3
,
const
WPlane
&
p
)
bool
testIntersectTriangle
(
const
WPosition
&
p1
,
const
WPosition
&
p2
,
const
WPosition
&
p3
,
const
WPlane
&
p
)
{
const
WVector3d
_2
&
normal
=
p
.
getNormal
();
const
WPosition
_2
&
planePoint
=
p
.
getPosition
();
const
WVector3d
&
normal
=
p
.
getNormal
();
const
WPosition
&
planePoint
=
p
.
getPosition
();
double
r1
=
dot
(
normal
,
p1
-
planePoint
);
double
r2
=
dot
(
normal
,
p2
-
planePoint
);
...
...
@@ -47,11 +46,11 @@ bool testIntersectTriangle( const WPosition_2& p1, const WPosition_2& p2, const
}
bool
intersectPlaneSegment
(
const
WPlane
&
p
,
const
WPosition
_2
&
p1
,
const
WPosition
_2
&
p2
,
boost
::
shared_ptr
<
WPosition
_2
>
pointOfIntersection
)
const
WPosition
&
p1
,
const
WPosition
&
p2
,
boost
::
shared_ptr
<
WPosition
>
pointOfIntersection
)
{
const
WVector3d
_2
&
normal
=
normalize
(
p
.
getNormal
()
);
const
WVector3d
&
normal
=
normalize
(
p
.
getNormal
()
);
double
const
d
=
dot
(
normal
,
p
.
getPosition
()
);
WAssert
(
pointOfIntersection
.
get
(),
"Place to store a point of intersection is not ready!"
);
*
pointOfIntersection
=
p
.
getPosition
();
// otherwise it would be undefined
...
...
@@ -84,15 +83,15 @@ bool intersectPlaneSegment( const WPlane& p,
return
false
;
}
bool
intersectPlaneLineNearCP
(
const
WPlane
&
p
,
const
WLine
&
l
,
boost
::
shared_ptr
<
WPosition
_2
>
cutPoint
)
bool
intersectPlaneLineNearCP
(
const
WPlane
&
p
,
const
WLine
&
l
,
boost
::
shared_ptr
<
WPosition
>
cutPoint
)
{
bool
result
=
false
;
double
minDistance
=
wlimits
::
MAX_DOUBLE
;
WAssert
(
cutPoint
.
get
(),
"Place to store a point of intersection is not ready!"
);
*
cutPoint
=
WPosition
_2
(
0
,
0
,
0
);
*
cutPoint
=
WPosition
(
0
,
0
,
0
);
for
(
size_t
i
=
1
;
i
<
l
.
size
();
++
i
)
// test each segment
{
boost
::
shared_ptr
<
WPosition
_2
>
cP
(
new
WPosition_2
(
0
,
0
,
0
)
);
boost
::
shared_ptr
<
WPosition
>
cP
(
new
WPosition
(
0
,
0
,
0
)
);
if
(
intersectPlaneSegment
(
p
,
l
[
i
-
1
],
l
[
i
],
cP
)
)
{
result
=
true
;
...
...
src/common/math/WMath.h
View file @
e795818b
...
...
@@ -37,7 +37,6 @@
#include "WLine.h"
#include "WPlane.h"
#include "linearAlgebra/WLinearAlgebra.h"
#include "linearAlgebra/WLinearAlgebra.h"
/**
* Classes and functions of math module of OpenWalnut.
...
...
@@ -82,7 +81,7 @@ inline int myIsfinite( double number )
*
* \return True if both intersects otherwise false.
*/
bool
OWCOMMON_EXPORT
testIntersectTriangle
(
const
WPosition
_2
&
p1
,
const
WPosition_2
&
p2
,
const
WPosition_2
&
p3
,
const
WPlane
&
p
);
bool
OWCOMMON_EXPORT
testIntersectTriangle
(
const
WPosition
&
p1
,
const
WPosition
&
p2
,
const
WPosition
&
p3
,
const
WPlane
&
p
);
/**
* Checks if the given segment intersects with the plane or not. Even if
...
...
@@ -99,9 +98,9 @@ bool OWCOMMON_EXPORT testIntersectTriangle( const WPosition_2& p1, const WPositi
* \return True if an intersection was detected, false otherwise.
*/
bool
OWCOMMON_EXPORT
intersectPlaneSegment
(
const
WPlane
&
p
,
const
WPosition
_2
&
p1
,
const
WPosition
_2
&
p2
,
boost
::
shared_ptr
<
WPosition
_2
>
pointOfIntersection
);
const
WPosition
&
p1
,
const
WPosition
&
p2
,
boost
::
shared_ptr
<
WPosition
>
pointOfIntersection
);
/**
* Checks a line (consecutive line segments) on intersection with a plane
...
...
@@ -114,7 +113,7 @@ bool OWCOMMON_EXPORT intersectPlaneSegment( const WPlane& p,
*
* \return True if an intersection was detected, false otherwise.
*/
bool
OWCOMMON_EXPORT
intersectPlaneLineNearCP
(
const
WPlane
&
p
,
const
WLine
&
l
,
boost
::
shared_ptr
<
WPosition
_2
>
cutPoint
);
bool
OWCOMMON_EXPORT
intersectPlaneLineNearCP
(
const
WPlane
&
p
,
const
WLine
&
l
,
boost
::
shared_ptr
<
WPosition
>
cutPoint
);
/**
* Computes the signum for the given value.
...
...
src/common/math/WMatrix.h
View file @
e795818b
...
...
@@ -70,7 +70,7 @@ public:
*
* \param newMatrix the matrix to copy
*/
WMatrix
(
const
WMatrix4d
_2
&
newMatrix
);
// NOLINT
WMatrix
(
const
WMatrix4d
&
newMatrix
);
// NOLINT
/**
* Makes the matrix contain the identity matrix, i.e. 1 on the diagonal.
...
...
@@ -108,7 +108,7 @@ public:
*
* \return casted matrix
*/
operator
WMatrix4d
_2
()
const
;
operator
WMatrix4d
()
const
;
/**
* Cast this matrix to an 4x4 osg matrix if it is a 4x4 matrix.
...
...
@@ -151,7 +151,7 @@ public:
* Multiplication with a vector.
* \param rhs The right hand side of the multiplication
*/
WVector3d
_2
operator
*
(
const
WVector3d_2
&
rhs
)
const
;
WVector3d
operator
*
(
const
WVector3d
&
rhs
)
const
;
/**
* Returns the transposed matrix.
...
...
@@ -185,7 +185,7 @@ template< typename T > WMatrix< T >::WMatrix( const WMatrix& newMatrix )
m_nbCols
=
newMatrix
.
m_nbCols
;
}
template
<
typename
T
>
WMatrix
<
T
>::
WMatrix
(
const
WMatrix4d
_2
&
newMatrix
)
template
<
typename
T
>
WMatrix
<
T
>::
WMatrix
(
const
WMatrix4d
&
newMatrix
)
:
WValue
<
T
>
(
4
*
4
)
{
m_nbCols
=
4
;
...
...
@@ -198,11 +198,11 @@ template< typename T > WMatrix< T >::WMatrix( const WMatrix4d_2& newMatrix )
}
}
template
<
typename
T
>
WMatrix
<
T
>::
operator
WMatrix4d
_2
()
const
template
<
typename
T
>
WMatrix
<
T
>::
operator
WMatrix4d
()
const
{
size_t
nbRows
=
this
->
size
()
/
m_nbCols
;
WAssert
(
m_nbCols
==
4
&&
nbRows
==
4
,
"This is no 4x4 matrix."
);
WMatrix4d
_2
m
;
WMatrix4d
m
;
for
(
size_t
i
=
0
;
i
<
nbRows
;
++
i
)
{
for
(
size_t
j
=
0
;
j
<
m_nbCols
;
++
j
)
...
...
@@ -375,10 +375,10 @@ template< typename T > WValue< T > WMatrix< T >::operator*( const WValue< T >& r