COMP: Remove unnecessary compiler flags for Mac builds.
COMP: Remove coding errors detected by mac builds.
COMP: Remove host of compiler warnings.
STYLE: Convert CMake-language commands lower case

Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:
NOTE: MUST USE GNU compliant version of sed
cmake --help-command-list \
| grep -v "cmake version" \
| while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
  done >convert.sed \
&& git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' \
   | xargs -0 gsed -i -f convert.sed \
&& rm convert.sed
COMP: Ran cppcheck looking for coding problems

In trying to make the program more robust, several changes
were made as indicated by the static analysis tool cppcheck.

/usr/local/bin/cppcheck -q --enable=all --force --inline-suppr  --template=gcc . > /tmp/cppcheck_warnings  2>&1
vim -q /tmp/cppcheck_warnings

src/Gao3DRSS/include/SFLSRobustStatSegmentor3DLabelMap_single.txx:776: style: Variable 'numElements' is assigned a value that is never used
src/Gao3DRSS/include/SFLSRobustStatSegmentor3DLabelMap_single.txx:826: style: Variable 'numElements' is assigned a value that is never used
src/Gao3DRSS/include/SFLSRobustStatSegmentor3DLabelMap_single.txx:899: style: Variable 'oldVoxelCount' is assigned a value that is never used
src/Gao3DRSS/include/SFLSRobustStatSegmentor3DLabelMap_single.txx:1011: style: Variable 'startingTime' is assigned a value that is never used
src/Gao3DRSS/include/SFLSRobustStatSegmentor3DLabelMap_single.txx:1049: style: Variable 'oldVoxelCount' is assigned a value that is never used
src/Gao3DRSS/include/SFLSRobustStatSegmentor3DLabelMap_single.txx:1125: style: Variable 'startingTime' is assigned a value that is never used
src/Gao3DRSS/include/SFLSRobustStatSegmentor3DLabelMap_single.txx:1160: style: Variable 'oldVoxelCount' is assigned a value that is never used
src/Gao3DRSS/src/Gao3DRSS.cpp:96: style: Consecutive return, break, continue, goto or throw statements are unnecessary.
src/KSegmentor/src/KSegmentor3D.cpp:275: error: Mismatching allocation and deallocation: imgSlice
src/KSegmentor/src/KSegmentor3D.cpp:277: error: Mismatching allocation and deallocation: maskSlice
src/KSegmentor/src/KSegmentor3D.cpp:279: error: Mismatching allocation and deallocation: U_I_slice
src/KSegmentor/src/KSegmentor3D.cpp:278: error: Mismatching allocation and deallocation: phiSlice
src/KSegmentor/src/KSegmentor3D.cpp:276: error: Mismatching allocation and deallocation: labelSlice
src/KSegmentor/src/KSegmentorBase.cpp:28: style: The scope of the variable 'tid' can be reduced
src/KSegmentor/src/KSegmentorBase.cpp:28: style: Variable 'nthreads' is assigned a value that is never used
src/KSegmentor/src/deprecated/LevelSetCurve.cpp:245: style: Variable 'delta' is assigned a value that is never used
src/KSegmentor/src/deprecated/LevelSetCurve.cpp:307: style: Variable 'oldval' is assigned a value that is never used
src/KSegmentor/src/deprecated/LevelSetCurve.cpp:343: style: Variable 'oldval' is assigned a value that is never used
src/KSegmentor/src/deprecated/LevelSetCurve.cpp:382: style: Variable 'oldval' is assigned a value that is never used
src/KSegmentor/src/deprecated/LevelSetCurve.cpp:418: style: Variable 'oldval' is assigned a value that is never used
src/KSegmentor/src/deprecated/LevelSetCurve.cpp:546: style: Variable 'breakhere' is assigned a value that is never used
src/KSegmentor/src/deprecated/MeanEnergy.cpp:36: style: Variable 'Ain' is assigned a value that is never used
src/KSegmentor/src/deprecated/MeanEnergy.cpp:37: style: Variable 'Aout' is assigned a value that is never used
src/KSegmentor/src/deprecated/MeanEnergy.cpp:78: style: Variable 'Ain' is assigned a value that is never used
src/KSegmentor/src/deprecated/MeanEnergy.cpp:79: style: Variable 'Aout' is assigned a value that is never used
src/KSegmentor/tests/ksegmentor_test2_sfm2D3D.cpp:36: warning: Member variable 'KSegTest2_Options::segmentor_iters' is not initialized in the constructor.
src/KSegmentor/tests/ksegmentor_test2_sfm2D3D.cpp:36: warning: Member variable 'KSegTest2_Options::smoothness_kappa' is not initialized in the constructor.
src/KSegmentor/tests/ksegmentor_test2_sfm2D3D.cpp:36: warning: Member variable 'KSegTest2_Options::verbose' is not initialized in the constructor.
src/KSegmentor/tests/ksegmentor_test2_sfm2D3D.cpp:204: error: Mismatching allocation and deallocation: phi
src/KSegmentor/tests/ksegmentor_test2_sfm2D3D.cpp:205: error: Mismatching allocation and deallocation: label
src/KSegmentor/tests/ksegmentor_test2_sfm2D3D.cpp:244: error: Mismatching allocation and deallocation: d_imagePtr
src/KSegmentor/tests/ksegmentor_test2_sfm2D3D.cpp:245: error: Mismatching allocation and deallocation: d_labelPtr
src/KSegmentor/tests/ksegmentor_test2_sfm2D3D.cpp:284: error: Mismatching allocation and deallocation: d_imagePtr
src/KSegmentor/tests/ksegmentor_test2_sfm2D3D.cpp:285: error: Mismatching allocation and deallocation: d_labelPtr
src/KSegmentor/tests/ksegmentor_test2_sfm3D.cpp:35: warning: Member variable 'KSegTest2_Options::segmentor_iters' is not initialized in the constructor.
src/KSegmentor/tests/ksegmentor_test2_sfm3D.cpp:35: warning: Member variable 'KSegTest2_Options::smoothness_kappa' is not initialized in the constructor.
src/KSegmentor/tests/ksegmentor_test2_sfm3D.cpp:35: warning: Member variable 'KSegTest2_Options::verbose' is not initialized in the constructor.
src/KSegmentor/tests/ksegmentor_test2_sfm3D.cpp:201: error: Mismatching allocation and deallocation: phi
src/KSegmentor/tests/ksegmentor_test2_sfm3D.cpp:202: error: Mismatching allocation and deallocation: label
src/KSegmentor/tests/ksegmentor_test2_sfm3D.cpp:241: error: Mismatching allocation and deallocation: d_imagePtr
src/KSegmentor/tests/ksegmentor_test2_sfm3D.cpp:242: error: Mismatching allocation and deallocation: d_labelPtr
src/KViewerMain/src/KViewer.cpp:307: style: Variable 'id' is assigned a value that is never used
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::labelActor2D' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::labelReslicer' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::labelLUT' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::colorMap' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::labelDataArray' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::label2D_shifter_scaler' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::ksegmentor' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::imageVolume' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::kv_opts' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::imageDimensions' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::imageSpacing' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::labelOpacity2D' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::labelInterpolate' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KInteractiveLabelMap.h:57: warning: Member variable 'KInteractiveLabelMap::sourceWidget' is not assigned a value in 'KInteractiveLabelMap::operator='.
src/KViewerMain/include/KViewer.h:56: warning: Member variable 'KViewer::m_RotX' is not initialized in the constructor.
src/KViewerMain/include/KViewer.h:56: warning: Member variable 'KViewer::m_RotY' is not initialized in the constructor.
src/KViewerMain/include/KViewer.h:56: warning: Member variable 'KViewer::m_RotZ' is not initialized in the constructor.
src/KViewerMain/include/KViewer.h:56: warning: Member variable 'KViewer::m_FlipZ' is not initialized in the constructor.
src/MeshCurvolver-2.0/exes/demo-standalone-code/DemoStandaloneMeshCurvolver.cxx:243: style: The scope of the variable 'u' can be reduced
src/MeshCurvolver-2.0/exes/demo-standalone-code/DemoStandaloneMeshCurvolver.cxx:243: style: The scope of the variable 'v' can be reduced
src/MeshCurvolver-2.0/exes/demo-standalone-code/DemoStandaloneMeshCurvolver.cxx:248: style: The scope of the variable 'Npts' can be reduced
src/MeshCurvolver-2.0/src/LSops.cxx:137: style: Variable 'maxid' is assigned a value that is never used
src/MeshCurvolver-2.0/src/LSops.cxx:137: style: Variable 'maxphiid' is assigned a value that is never used
src/MeshCurvolver-2.0/src/LSops.cxx:167: style: Variable 'minid' is assigned a value that is never used
src/MeshCurvolver-2.0/src/LSops.cxx:167: style: Variable 'minphiid' is assigned a value that is never used
src/MeshCurvolver-2.0/src/LSops.cxx:200: style: Variable 'maxid' is assigned a value that is never used
src/MeshCurvolver-2.0/src/LSops.cxx:200: style: Variable 'maxphiid' is assigned a value that is never used
src/MeshCurvolver-2.0/src/LSops.cxx:230: style: Variable 'minid' is assigned a value that is never used
src/MeshCurvolver-2.0/src/LSops.cxx:230: style: Variable 'minphiid' is assigned a value that is never used
src/MeshCurvolver-2.0/src/LSops.cxx:268: performance: Possible inefficient checking for 'Sz' emptiness.
src/MeshCurvolver-2.0/src/LSops.cxx:277: performance: Possible inefficient checking for 'Sn1' emptiness.
src/MeshCurvolver-2.0/src/LSops.cxx:290: performance: Possible inefficient checking for 'Sp1' emptiness.
src/MeshCurvolver-2.0/src/LSops.cxx:309: performance: Possible inefficient checking for 'Sn2' emptiness.
src/MeshCurvolver-2.0/src/LSops.cxx:315: performance: Possible inefficient checking for 'Sp2' emptiness.
src/MeshCurvolver-2.0/src/MeanCurvatureEnergy.cpp:52: style: The scope of the variable 'alpha' can be reduced
src/MeshCurvolver-2.0/src/path_finder.cpp:243: style: Variable 'sPrev' is assigned a value that is never used
src/MeshCurvolver-2.0/src/path_finder.cpp:230: performance: Function parameter 'seeds' should be passed by reference.
src/MeshCurvolver-2.0/src/vtkInitClosedPath.cxx:137: style: Unused variable: Lp1
src/MeshCurvolver-2.0/src/vtkInitClosedPath.cxx:138: style: Unused variable: Ln1
src/MeshCurvolver-2.0/src/vtkInitClosedPath.cxx:139: style: Unused variable: Ln2
src/MeshCurvolver-2.0/src/vtkInitClosedPath.cxx:140: style: Unused variable: Lp2
src/MeshCurvolver-2.0/src/vtkInitClosedPath.cxx:141: style: Unused variable: Lz
src/MeshCurvolver-2.0/src/vtkInitClosedPath.cxx:142: style: Unused variable: L0
src/MeshCurvolver-2.0/tests/test5_distance_functions_from_markers.cxx:102: style: The scope of the variable 'idx_min' can be reduced
src/MeshCurvolver-2.0/tests/test5_distance_functions_from_markers.cxx:102: style: Variable 'idx_min' is assigned a value that is never used
src/SampleApplications/Make3DModel/3DModel_src/Model3D.cxx:84: style: The scope of the variable 'keypressed' can be reduced
src/SampleApplications/Make3DModel/3DModel_src/Model3D.cxx:84: style: Variable 'keypressed' is assigned a value that is never used
src/SampleApplications/Make3DModel/3DModel_src/Model3D.cxx:146: style: Variable 'failure' is not assigned a value
src/SampleApplications/Make3DModel/3DModel_src/Model3D.cxx:149: error: Memory pointed to by 'failure' is freed twice.
src/SampleApplications/Make3DModel/3DModel_src/Model3D.cxx:148: error: Uninitialized variable: failure
src/SampleApplications/Make3DModel/3DModel_src/Model3D.cxx:149: error: Uninitialized variable: failure
src/SampleApplications/VolumeRenderDemo/MultiLabelVolumeRender.cpp:72: warning: Ineffective statement similar to '*A++;'. Did you intend to write '(*A)++;'?
src/SampleApplications/VolumeRenderDemo/VolumeRenderDemo.cxx:40: warning: Ineffective statement similar to '*A++;'. Did you intend to write '(*A)++;'?
src/SampleApplications/VolumeRenderDemo/VolumeRenderDemo.cxx:68: warning: Ineffective statement similar to '*A++;'. Did you intend to write '(*A)++;'?
src/sfm_local_chanvese/src/conv1d/src/convolution.cpp:513: error: Memory leak: tmp
src/sfm_local_chanvese/src/conv1d/src/convolution.cpp:700: error: Memory leak: tmp
src/sfm_local_chanvese/src/conv1d/src/convolution.cpp:888: error: Memory leak: tmp
src/sfm_local_chanvese/src/conv1d/src/convolution.cpp:1083: error: Memory leak: tmp
src/sfm_local_chanvese/src/conv1d/src/convolution.cpp:1267: error: Memory leak: tmp
src/sfm_local_chanvese/src/energy3c.cpp:89: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:91: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:93: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:126: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:128: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:130: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:153: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:155: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:157: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:228: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:230: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:232: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:265: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:267: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:269: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:292: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:294: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:296: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:429: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:431: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:433: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:454: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:456: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:458: style: Boolean result is used in bitwise operation. Clarify expression with parentheses
src/sfm_local_chanvese/src/energy3c.cpp:533: style: Variable 'I' is assigned a value that is never used
src/sfm_local_chanvese/src/energy3c.cpp:710: style: Variable 'dv' is assigned a value that is never used
src/sfm_local_chanvese/src/energy3c.cpp:863: style: Variable 'kmax' is assigned a value that is never used
src/sfm_local_chanvese/src/energy3c.cpp:864: style: Variable 'idxN' is assigned a value that is never used
src/sfm_local_chanvese/src/energy3c.cpp:1713: style: Variable 'testSumBefore' is assigned a value that is never used
checkpoint before pull from hjmjohnson
Merge branch 'MacBuildFixes' of git://github.com/hjmjohnson/kslice
- remove deprecated stuff
- switch to boost shared pointer everywhere, fixed a few issues like crash
- verified usable w/ Hans' updates
- verified able to draw a 1-pixel line and force it to be part of
      segmentation
- verified able to rotate, save, toggle opacity, add more labels