diff -pruN 5.6.4~dfsg.1-1/caret/caret5.pro 5.6.4~dfsg.1-1ubuntu3/caret/caret5.pro
--- 5.6.4~dfsg.1-1/caret/caret5.pro	2012-02-05 07:48:13.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/caret/caret5.pro	2012-02-05 07:48:14.000000000 +0000
@@ -201,7 +201,7 @@ ubuntu {
    
    LIBS += $$VTK_LIBS
    LIBS -= -lvtkjpeg -lvtkpng -lvtkexpat -lvtkzlib
-   LIBS += -ldl -lz -lqwt-qt4
+   LIBS += -ldl -lz -lqwt
    QTPLUGIN -= qgif qjpeg qtiff
    QMAKE_CXXFLAGS += -DUBUNTU
 
diff -pruN 5.6.4~dfsg.1-1/caret_brain_set/caret_brain_set.pro 5.6.4~dfsg.1-1ubuntu3/caret_brain_set/caret_brain_set.pro
--- 5.6.4~dfsg.1-1/caret_brain_set/caret_brain_set.pro	2012-02-05 07:48:13.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/caret_brain_set/caret_brain_set.pro	2012-02-05 07:48:14.000000000 +0000
@@ -12,7 +12,7 @@ dll {
 	CONFIG += plugin
 	LIBS += $$VTK_LIBS
 }
-
+LIBS += -lGLU
 
 vs:TEMPLATE=vclib
 !vs:TEMPLATE=lib
diff -pruN 5.6.4~dfsg.1-1/caret_files/BorderFile.h 5.6.4~dfsg.1-1ubuntu3/caret_files/BorderFile.h
--- 5.6.4~dfsg.1-1/caret_files/BorderFile.h	2011-06-03 05:19:14.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/caret_files/BorderFile.h	2012-02-05 07:48:14.000000000 +0000
@@ -28,6 +28,7 @@
 #define __VE_BORDER_FILE_H__
 
 #include <QGLWidget>
+#include <GL/glu.h>
 
 #include "AbstractFile.h"
 #include "FileException.h"
diff -pruN 5.6.4~dfsg.1-1/caret_qmake_include.pro 5.6.4~dfsg.1-1ubuntu3/caret_qmake_include.pro
--- 5.6.4~dfsg.1-1/caret_qmake_include.pro	2011-06-03 05:19:14.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/caret_qmake_include.pro	2012-02-05 07:48:14.000000000 +0000
@@ -271,7 +271,7 @@ ubuntu {    
         
     LIBS += -lpng
     contains (DEFINES, HAVE_QWT) {
-       QWT_LIBS = -L$$(QWT_LIB_DIR) -lqwt-qt4
+       QWT_LIBS = -L$$(QWT_LIB_DIR) -lqwt
     }
     DEFINES -= HAVE_MPEG
     VTK_LIBS -= -lvtkMPEG2Encode
diff -pruN 5.6.4~dfsg.1-1/debian/changelog 5.6.4~dfsg.1-1ubuntu3/debian/changelog
--- 5.6.4~dfsg.1-1/debian/changelog	2011-06-04 23:16:59.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/debian/changelog	2012-02-05 05:46:44.000000000 +0000
@@ -1,3 +1,30 @@
+caret (5.6.4~dfsg.1-1ubuntu3) precise; urgency=low
+
+  * Fix FTBFS, adding glu.h and -lGLU where necessary.
+
+ -- Ilya Barygin <randomaction@ubuntu.com>  Sun, 05 Feb 2012 09:46:16 +0400
+
+caret (5.6.4~dfsg.1-1ubuntu2) precise; urgency=low
+
+  * No change rebuild for vtk transition.
+
+ -- Bhavani Shankar <bhavi@ubuntu.com>  Wed, 21 Dec 2011 18:14:46 +0530
+
+caret (5.6.4~dfsg.1-1ubuntu1) oneiric; urgency=low
+
+  * Build-depend on libqwt-dev instead of libqwt5-qt4-dev as part of qwt6
+    transition
+  * Add debian/patches/qwt6-linking and update no_undefineds to fix link target
+    for qwt6
+
+ -- Scott Kitterman <scott@kitterman.com>  Fri, 26 Aug 2011 17:15:54 -0400
+
+caret (5.6.4~dfsg.1-1build1) oneiric; urgency=low
+
+  * No-change rebuild for VTK 5.6.
+
+ -- Stefano Rivera <stefanor@ubuntu.com>  Sun, 12 Jun 2011 13:45:12 +0200
+
 caret (5.6.4~dfsg.1-1) unstable; urgency=low
 
   * New upstream release.
diff -pruN 5.6.4~dfsg.1-1/debian/control 5.6.4~dfsg.1-1ubuntu3/debian/control
--- 5.6.4~dfsg.1-1/debian/control	2011-03-14 00:52:35.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/debian/control	2011-08-26 21:16:46.000000000 +0000
@@ -1,9 +1,10 @@
 Source: caret
 Section: science
 Priority: optional
-Maintainer: NeuroDebian Team <team@neuro.debian.net>
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: NeuroDebian Team <team@neuro.debian.net>
 Uploaders: Michael Hanke <mih@debian.org>, Yaroslav Halchenko <debian@onerussian.com>
-Build-Depends: debhelper (>= 5), libqt4-dev (>= 4.3), libqt4-opengl-dev | libqt4-dev (<< 4.4.0), libqwt5-qt4-dev, libvtk5-dev, libminc-dev, libqtassistantclient-dev, libpng12-dev | libpng-dev
+Build-Depends: debhelper (>= 5), libqt4-dev (>= 4.3), libqt4-opengl-dev | libqt4-dev (<< 4.4.0), libqwt-dev, libvtk5-dev, libminc-dev, libqtassistantclient-dev, libpng12-dev | libpng-dev
 Standards-Version: 3.9.1
 Homepage: http://brainvis.wustl.edu/wiki/index.php/Caret:About
 Vcs-Browser: http://git.debian.org/?p=pkg-exppsy/caret.git
diff -pruN 5.6.4~dfsg.1-1/debian/patches/glu.patch 5.6.4~dfsg.1-1ubuntu3/debian/patches/glu.patch
--- 5.6.4~dfsg.1-1/debian/patches/glu.patch	1970-01-01 00:00:00.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/debian/patches/glu.patch	2012-02-05 05:46:14.000000000 +0000
@@ -0,0 +1,24 @@
+Description: add missing include and library reference
+Author: Ilya Barygin <randomaction@ubuntu.com>
+
+--- caret-5.6.4~dfsg.1.orig/caret_files/BorderFile.h
++++ caret-5.6.4~dfsg.1/caret_files/BorderFile.h
+@@ -28,6 +28,7 @@
+ #define __VE_BORDER_FILE_H__
+ 
+ #include <QGLWidget>
++#include <GL/glu.h>
+ 
+ #include "AbstractFile.h"
+ #include "FileException.h"
+--- caret-5.6.4~dfsg.1.orig/caret_brain_set/caret_brain_set.pro
++++ caret-5.6.4~dfsg.1/caret_brain_set/caret_brain_set.pro
+@@ -12,7 +12,7 @@
+ 	CONFIG += plugin
+ 	LIBS += $$VTK_LIBS
+ }
+-
++LIBS += -lGLU
+ 
+ vs:TEMPLATE=vclib
+ !vs:TEMPLATE=lib
diff -pruN 5.6.4~dfsg.1-1/debian/patches/no_undefineds 5.6.4~dfsg.1-1ubuntu3/debian/patches/no_undefineds
--- 5.6.4~dfsg.1-1/debian/patches/no_undefineds	2011-06-04 23:09:01.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/debian/patches/no_undefineds	2011-08-26 22:16:43.000000000 +0000
@@ -23,7 +23,7 @@
     LIBS += $$VTK_LIBS
     LIBS -= -lvtkjpeg -lvtkpng -lvtkexpat -lvtkzlib
 -   LIBS += -ldl
-+   LIBS += -ldl -lz -lqwt-qt4
++   LIBS += -ldl -lz -lqwt
     QTPLUGIN -= qgif qjpeg qtiff
     QMAKE_CXXFLAGS += -DUBUNTU
  
diff -pruN 5.6.4~dfsg.1-1/debian/patches/qwt6-linking 5.6.4~dfsg.1-1ubuntu3/debian/patches/qwt6-linking
--- 5.6.4~dfsg.1-1/debian/patches/qwt6-linking	1970-01-01 00:00:00.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/debian/patches/qwt6-linking	2011-08-26 21:47:29.000000000 +0000
@@ -0,0 +1,37 @@
+Description: Upstream changes introduced in version 5.6.4~dfsg.1-1ubuntu1
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ caret (5.6.4~dfsg.1-1ubuntu1) oneiric; urgency=low
+ .
+   * Build-depend on libqwt-dev instead of libqwt5-qt4-dev as part of qwt6
+     transition
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Scott Kitterman <scott@kitterman.com>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- caret-5.6.4~dfsg.1.orig/caret_qmake_include.pro
++++ caret-5.6.4~dfsg.1/caret_qmake_include.pro
+@@ -271,7 +271,7 @@ ubuntu {
+         
+     LIBS += -lpng
+     contains (DEFINES, HAVE_QWT) {
+-       QWT_LIBS = -L$$(QWT_LIB_DIR) -lqwt-qt4
++       QWT_LIBS = -L$$(QWT_LIB_DIR) -lqwt
+     }
+     DEFINES -= HAVE_MPEG
+     VTK_LIBS -= -lvtkMPEG2Encode
diff -pruN 5.6.4~dfsg.1-1/debian/patches/series 5.6.4~dfsg.1-1ubuntu3/debian/patches/series
--- 5.6.4~dfsg.1-1/debian/patches/series	2011-06-04 23:07:18.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/debian/patches/series	2012-02-04 20:03:02.000000000 +0000
@@ -4,3 +4,5 @@ ifdef_fixes
 missing_header
 version_suffix
 nuisance2advice
+qwt6-linking
+glu.patch
diff -pruN 5.6.4~dfsg.1-1/.pc/applied-patches 5.6.4~dfsg.1-1ubuntu3/.pc/applied-patches
--- 5.6.4~dfsg.1-1/.pc/applied-patches	2012-02-05 07:48:13.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/.pc/applied-patches	2012-02-05 07:48:14.000000000 +0000
@@ -4,3 +4,5 @@ ifdef_fixes
 missing_header
 version_suffix
 nuisance2advice
+qwt6-linking
+glu.patch
diff -pruN 5.6.4~dfsg.1-1/.pc/glu.patch/caret_brain_set/caret_brain_set.pro 5.6.4~dfsg.1-1ubuntu3/.pc/glu.patch/caret_brain_set/caret_brain_set.pro
--- 5.6.4~dfsg.1-1/.pc/glu.patch/caret_brain_set/caret_brain_set.pro	1970-01-01 00:00:00.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/.pc/glu.patch/caret_brain_set/caret_brain_set.pro	2012-02-05 07:48:14.000000000 +0000
@@ -0,0 +1,382 @@
+######################################################################
+# Automatically generated by qmake (1.04a) Wed Jan 15 08:45:10 2003
+######################################################################
+
+TARGET       = CaretBrainSet
+CONFIG  += staticlib 
+INCLUDEPATH += .
+# need to include before ubuntu settings to get VTK_LIBS
+include(../caret_qmake_include.pro)
+dll {
+	CONFIG -= staticlib
+	CONFIG += plugin
+	LIBS += $$VTK_LIBS
+}
+
+
+vs:TEMPLATE=vclib
+!vs:TEMPLATE=lib
+
+# Input
+HEADERS += BorderFileProjector.h \
+	   BorderProjectionUnprojector.h \
+	   BorderToTopographyConverter.h \
+	   BorderUncertaintyToArealEstimationConverter.h \
+      BrainModel.h \
+	   BrainModelAlgorithm.h \
+	   BrainModelAlgorithmException.h \
+      BrainModelAlgorithmMultiThreadExecutor.h \
+	   BrainModelAlgorithmMultiThreaded.h \
+      BrainModelAlgorithmRunAsThread.h \
+	   BrainModelBorderSet.h \
+       BrainModelCiftiCorrelationMatrix.h \
+	   BrainModelContours.h \
+	   BrainModelContourToSurfaceConverter.h \
+      BrainModelIdentification.h \
+      BrainModelOpenGL.h \
+      BrainModelOpenGLSelectedItem.h \
+      BrainModelRunExternalProgram.h \
+      BrainModelStandardSurfaceReplacement.h \
+      BrainModelSurface.h \
+      BrainModelSurfaceAffineRegression.h \
+	   BrainModelSurfaceAndVolume.h \
+      BrainModelSurfaceBankStraddling.h \
+      BrainModelSurfaceBorderCutter.h \
+      BrainModelSurfaceBorderLandmarkIdentification.h \
+       BrainModelSurfaceBorderToMetricConverter.h \
+      BrainModelSurfaceBorderToPaintConverter.h \
+      BrainModelSurfaceCellAttributeAssignment.h \
+      BrainModelSurfaceCellDensityToMetric.h \
+      BrainModelSurfaceClusterToBorderConverter.h \
+	   BrainModelSurfaceConnectedSearch.h \
+	   BrainModelSurfaceConnectedSearchMetric.h \
+      BrainModelSurfaceConnectedSearchPaint.h \
+	   BrainModelSurfaceCurvature.h \
+	   BrainModelSurfaceCutter.h \
+	   BrainModelSurfaceDeformDataFile.h \
+	   BrainModelSurfaceDeformation.h \
+	   BrainModelSurfaceDeformationFlat.h \
+      BrainModelSurfaceDeformationMapCreate.h \
+      BrainModelSurfaceDeformationMeasurement.h \
+      BrainModelSurfaceDeformationMultiStageSphericalVector.h \
+	   BrainModelSurfaceDeformationSpherical.h \
+      BrainModelSurfaceDeformationSphericalSlits.h \
+       BrainModelSurfaceDeformationSphericalVector.h \
+	   BrainModelSurfaceDistortion.h \
+      BrainModelSurfaceFindExtremum.h \
+	   BrainModelSurfaceFlatHexagonalSubsample.h \
+	   BrainModelSurfaceFlattenFullHemisphere.h \
+      BrainModelSurfaceFlattenHemisphere.h \
+	   BrainModelSurfaceFlattenPartialHemisphere.h \
+      BrainModelSurfaceFociSearch.h \
+      BrainModelSurfaceFociUncertaintyToRgbPaint.h \
+	   BrainModelSurfaceGeodesic.h \
+      BrainModelSurfaceMetricAnovaOneWay.h \
+      BrainModelSurfaceMetricAnovaTwoWay.h \
+	   BrainModelSurfaceMetricClustering.h \
+      BrainModelSurfaceMetricCoordinateDifference.h \
+      BrainModelSurfaceMetricCorrelationMatrix.h \
+	   BrainModelSurfaceMetricExtrema.h \
+      BrainModelSurfaceMetricFindClustersBase.h \
+      BrainModelSurfaceMetricFullWidthHalfMaximum.h \
+	   BrainModelSurfaceMetricGradient.h \
+      BrainModelSurfaceMetricInGroupDifference.h \
+      BrainModelSurfaceMetricInterHemClusters.h \
+      BrainModelSurfaceMetricKruskalWallisRankTest.h \
+      BrainModelSurfaceMetricOneAndPairedTTest.h \
+      BrainModelSurfaceMetricTwinComparison.h \
+      BrainModelSurfaceMetricTwoSampleTTest.h \
+      BrainModelSurfaceMetricSmoothing.h \
+      BrainModelSurfaceMetricSmoothingAll.h \
+	   BrainModelSurfaceMorphing.h \
+	   BrainModelSurfaceMultiresolutionMorphing.h \
+      BrainModelSurfaceNodeColoring.h \
+      BrainModelSurfaceOverlay.h \
+      BrainModelSurfacePaintAssignRelativeToLine.h \
+      BrainModelSurfacePaintSulcalIdentification.h \
+      BrainModelSurfacePaintToBorderConverter.h \
+	   BrainModelSurfacePointLocator.h \
+	   BrainModelSurfacePointProjector.h \
+      BrainModelSurfacePolyhedron.h \
+      BrainModelSurfacePolyhedronNew.h \
+      BrainModelSurfaceROIAssignMetric.h \
+      BrainModelSurfaceROIAssignMetricNodeArea.h \
+      BrainModelSurfaceROIAssignPaint.h \
+      BrainModelSurfaceROIAssignShape.h \
+      BrainModelSurfaceROICreateBorderUsingGeodesic.h \
+      BrainModelSurfaceROICreateBorderUsingMetricShape.h \
+      BrainModelSurfaceROIFoldingMeasurementReport.h \
+      BrainModelSurfaceROIIntegratedFoldingIndexReport.h \
+      BrainModelSurfaceROIMetricClusterReport.h \
+      BrainModelSurfaceROIMetricGradient.h \
+	  BrainModelSurfaceROIMetricSmoothing.h \
+      BrainModelSurfaceROINodeSelection.h \
+      BrainModelSurfaceROIOperation.h \
+      BrainModelSurfaceROIPaintReport.h \
+      BrainModelSurfaceROIProbAtlasOverlapReport.h \
+      BrainModelSurfaceROIShapeCorrelationReport.h \
+      BrainModelSurfaceROISurfaceXYZMeansReport.h \
+      BrainModelSurfaceROITextReport.h \
+	   BrainModelSurfaceResection.h \
+	   BrainModelSurfaceSmoothing.h \
+      BrainModelSurfaceSphericalTessellator.h \
+      BrainModelSurfaceStandardSphere.h \
+	   BrainModelSurfaceSulcalDepth.h \
+      BrainModelSurfaceSulcalDepthWithNormals.h \
+      BrainModelSurfaceSulcalIdentificationProbabilistic.h \
+	   BrainModelSurfaceToVolumeConverter.h \
+      BrainModelSurfaceToVolumeSegmentationConverter.h \
+      BrainModelSurfaceTopologyCorrector.h \
+	   BrainModelVolume.h \
+      BrainModelVolumeBiasCorrection.h \
+      BrainModelVolumeCrossoverHandleFinder.h \
+      BrainModelVolumeFociDensity.h \
+      BrainModelVolumeFociUnprojector.h \
+      BrainModelVolumeGradient.h \
+	   BrainModelVolumeHandleFinder.h \
+      BrainModelVolumeLigaseSegmentation.h \
+      BrainModelVolumeNearToPlane.h \
+      BrainModelVolumeProbAtlasToFunctional.h \
+      BrainModelVolumeRegionOfInterest.h \
+      BrainModelVolumeROIAtlasResamplingAndSmoothing.h \
+      BrainModelVolumeROIGradient.h \
+      BrainModelVolumeROIMinima.h \
+      BrainModelVolumeROISmoothing.h \
+      BrainModelVolumeSegmentationStereotaxic.h \
+      BrainModelVolumeSureFitErrorCorrection.h \
+      BrainModelVolumeSureFitSegmentation.h \
+      BrainModelVolumeTFCE.h \
+      BrainModelVolumeThresholdSegmentation.h \
+	   BrainModelVolumeToSurfaceConverter.h \
+      BrainModelVolumeToSurfaceMapper.h \
+      BrainModelVolumeToSurfaceMapperAlgorithmParameters.h \
+      BrainModelVolumeToSurfaceMapperPALS.h \
+      BrainModelVolumeToVtkSurfaceMapper.h \
+      BrainModelVolumeTopologicalError.h \
+      BrainModelVolumeTopologyGraph.h \
+      BrainModelVolumeTopologyGraphCorrector.cxx \
+	   BrainModelVolumeVoxelColoring.h \
+      BrainSet.h  \
+      BrainSetAutoLoaderFile.h \
+      BrainSetAutoLoaderManager.h \
+      BrainSetAutoLoaderFileMetric.h \
+      BrainSetAutoLoaderFileMetricByNode.h \
+      BrainSetAutoLoaderFilePaintCluster.h \
+      BrainSetDataFileReader.h \
+      BrainSetMultiThreadedSpecFileReader.h \
+	   BrainSetNodeAttribute.h \
+	   CellFileProjector.h \
+      CellProjectionUnprojector.h \
+      DisplaySettings.h \
+      DisplaySettingsArealEstimation.h \
+      DisplaySettingsBorders.h \
+      DisplaySettingsCells.h \
+	   DisplaySettingsCoCoMac.h \
+	   DisplaySettingsContours.h \
+	   DisplaySettingsCuts.h \
+	   DisplaySettingsDeformationField.h \
+      DisplaySettingsFoci.h \
+      DisplaySettingsGeodesicDistance.h \
+      DisplaySettingsImages.h \
+      DisplaySettingsMetric.h \
+      BrainSetAutoLoaderFileFunctionalVolume.h \
+	   DisplaySettingsModels.h \
+      DisplaySettingsNodeAttributeFile.h \
+	   DisplaySettingsSurface.h \
+      DisplaySettingsPaint.h \
+      DisplaySettingsProbabilisticAtlas.h \
+      DisplaySettingsRgbPaint.h \
+      DisplaySettingsScene.h \
+      DisplaySettingsSection.h \
+      DisplaySettingsStudyMetaData.h \
+      DisplaySettingsSurfaceShape.h \
+      DisplaySettingsVectors.h \
+      DisplaySettingsTopography.h \
+      DisplaySettingsVectors.h \
+ 	   DisplaySettingsVolume.h \
+      DisplaySettingsWustlRegion.h \
+      FociFileToPalsProjector.h \
+      MapFmriAtlasSpecFileInfo.h \
+	   MetricsToRgbPaintConverter.h \
+      Tessellation.h 
+
+SOURCES += BorderFileProjector.cxx \
+	   BorderProjectionUnprojector.cxx \
+	   BorderToTopographyConverter.cxx \
+	   BorderUncertaintyToArealEstimationConverter.cxx \
+	   BrainModel.cxx \
+      BrainModelAlgorithm.cxx \
+      BrainModelAlgorithmException.cxx \
+      BrainModelAlgorithmMultiThreadExecutor.cxx \
+	   BrainModelAlgorithmMultiThreaded.cxx \
+      BrainModelAlgorithmRunAsThread.cxx \
+	   BrainModelBorderSet.cxx \
+       BrainModelCiftiCorrelationMatrix.cxx \
+	   BrainModelContours.cxx \
+	   BrainModelContourToSurfaceConverter.cxx \
+      BrainModelIdentification.cxx \
+      BrainModelOpenGL.cxx \
+      BrainModelOpenGLSelectedItem.cxx \
+      BrainModelRunExternalProgram.cxx \
+      BrainModelStandardSurfaceReplacement.cxx \
+      BrainModelSurface.cxx \
+      BrainModelSurfaceAffineRegression.cxx \
+	   BrainModelSurfaceAndVolume.cxx \
+      BrainModelSurfaceBankStraddling.cxx \
+      BrainModelSurfaceBorderCutter.cxx \
+      BrainModelSurfaceBorderLandmarkIdentification.cxx \
+      BrainModelSurfaceBorderToMetricConverter.cxx \
+      BrainModelSurfaceBorderToPaintConverter.cxx \
+      BrainModelSurfaceCellAttributeAssignment.cxx \
+      BrainModelSurfaceCellDensityToMetric.cxx \
+      BrainModelSurfaceClusterToBorderConverter.cxx \
+	   BrainModelSurfaceConnectedSearch.cxx \
+	   BrainModelSurfaceConnectedSearchMetric.cxx \
+      BrainModelSurfaceConnectedSearchPaint.cxx \
+	   BrainModelSurfaceCurvature.cxx \
+	   BrainModelSurfaceCutter.cxx \
+	   BrainModelSurfaceDeformDataFile.cxx \
+	   BrainModelSurfaceDeformation.cxx \
+	   BrainModelSurfaceDeformationFlat.cxx \
+      BrainModelSurfaceDeformationMapCreate.cxx \
+      BrainModelSurfaceDeformationMeasurement.cxx \
+      BrainModelSurfaceDeformationMultiStageSphericalVector.cxx \
+      BrainModelSurfaceDeformationSphericalSlits.cxx \
+       BrainModelSurfaceDeformationSphericalVector.cxx \
+	   BrainModelSurfaceDeformationSpherical.cxx \
+	   BrainModelSurfaceDistortion.cxx \
+      BrainModelSurfaceFindExtremum.cxx \
+	   BrainModelSurfaceFlatHexagonalSubsample.cxx \
+	   BrainModelSurfaceFlattenFullHemisphere.cxx \
+      BrainModelSurfaceFlattenHemisphere.cxx \
+	   BrainModelSurfaceFlattenPartialHemisphere.cxx \
+      BrainModelSurfaceFociSearch.cxx \
+      BrainModelSurfaceFociUncertaintyToRgbPaint.cxx \
+	   BrainModelSurfaceGeodesic.cxx \
+      BrainModelSurfaceMetricAnovaOneWay.cxx \
+      BrainModelSurfaceMetricAnovaTwoWay.cxx \
+	   BrainModelSurfaceMetricClustering.cxx \
+      BrainModelSurfaceMetricCoordinateDifference.cxx \
+      BrainModelSurfaceMetricCorrelationMatrix.cxx \
+	   BrainModelSurfaceMetricExtrema.cxx \
+      BrainModelSurfaceMetricFindClustersBase.cxx \
+      BrainModelSurfaceMetricFullWidthHalfMaximum.cxx \
+	   BrainModelSurfaceMetricGradient.cxx \
+      BrainModelSurfaceMetricInGroupDifference.cxx \
+      BrainModelSurfaceMetricInterHemClusters.cxx \
+      BrainModelSurfaceMetricKruskalWallisRankTest.cxx \
+      BrainModelSurfaceMetricOneAndPairedTTest.cxx \
+      BrainModelSurfaceMetricTwinComparison.cxx \
+      BrainModelSurfaceMetricTwoSampleTTest.cxx \
+      BrainModelSurfaceMetricSmoothing.cxx \
+      BrainModelSurfaceMetricSmoothingAll.cxx \
+	   BrainModelSurfaceMorphing.cxx \
+	   BrainModelSurfaceMultiresolutionMorphing.cxx \
+      BrainModelSurfaceNodeColoring.cxx \
+      BrainModelSurfaceOverlay.cxx \
+      BrainModelSurfacePaintAssignRelativeToLine.cxx \
+      BrainModelSurfacePaintSulcalIdentification.cxx \
+      BrainModelSurfacePaintToBorderConverter.cxx \
+	   BrainModelSurfacePointLocator.cxx \
+	   BrainModelSurfacePointProjector.cxx \
+      BrainModelSurfacePolyhedron.cxx \
+      BrainModelSurfacePolyhedronNew.cxx \
+      BrainModelSurfaceROIAssignMetric.cxx \
+      BrainModelSurfaceROIAssignMetricNodeArea.cxx \
+      BrainModelSurfaceROIAssignPaint.cxx \
+      BrainModelSurfaceROIAssignShape.cxx \
+      BrainModelSurfaceROICreateBorderUsingGeodesic.cxx \
+      BrainModelSurfaceROICreateBorderUsingMetricShape.cxx \
+      BrainModelSurfaceROIFoldingMeasurementReport.cxx \
+      BrainModelSurfaceROIIntegratedFoldingIndexReport.cxx \
+      BrainModelSurfaceROIMetricClusterReport.cxx \
+      BrainModelSurfaceROIMetricGradient.cxx \
+	  BrainModelSurfaceROIMetricSmoothing.cxx \
+      BrainModelSurfaceROINodeSelection.cxx \
+      BrainModelSurfaceROIOperation.cxx \
+      BrainModelSurfaceROIPaintReport.cxx \
+      BrainModelSurfaceROIProbAtlasOverlapReport.cxx \
+      BrainModelSurfaceROIShapeCorrelationReport.cxx \
+      BrainModelSurfaceROISurfaceXYZMeansReport.cxx \
+      BrainModelSurfaceROITextReport.cxx \
+	   BrainModelSurfaceResection.cxx \
+      BrainModelSurfaceSphericalTessellator.cxx \
+	   BrainModelSurfaceSmoothing.cxx \
+      BrainModelSurfaceStandardSphere.cxx \
+	   BrainModelSurfaceSulcalDepth.cxx \
+      BrainModelSurfaceSulcalDepthWithNormals.cxx \
+      BrainModelSurfaceSulcalIdentificationProbabilistic.cxx \
+	   BrainModelSurfaceToVolumeConverter.cxx \
+      BrainModelSurfaceToVolumeSegmentationConverter.cxx \
+      BrainModelSurfaceTopologyCorrector.cxx \
+	   BrainModelVolume.cxx \
+      BrainModelVolumeBiasCorrection.cxx \
+      BrainModelVolumeCrossoverHandleFinder.cxx \
+      BrainModelVolumeFociDensity.cxx \
+      BrainModelVolumeFociUnprojector.cxx \
+      BrainModelVolumeGradient.cxx \
+	   BrainModelVolumeHandleFinder.cxx \
+      BrainModelVolumeLigaseSegmentation.cxx \
+      BrainModelVolumeNearToPlane.cxx \
+      BrainModelVolumeProbAtlasToFunctional.cxx \
+      BrainModelVolumeRegionOfInterest.cxx \
+      BrainModelVolumeROIAtlasResamplingAndSmoothing.cxx \
+      BrainModelVolumeROIGradient.cxx \
+      BrainModelVolumeROIMinima.cxx \
+      BrainModelVolumeROISmoothing.cxx \
+      BrainModelVolumeSegmentationStereotaxic.cxx \
+      BrainModelVolumeSureFitErrorCorrection.cxx \
+      BrainModelVolumeSureFitSegmentation.cxx \
+      BrainModelVolumeTFCE.cxx \
+      BrainModelVolumeThresholdSegmentation.cxx \
+	   BrainModelVolumeToSurfaceConverter.cxx \
+      BrainModelVolumeToSurfaceMapper.cxx \
+      BrainModelVolumeToSurfaceMapperAlgorithmParameters.cxx \
+      BrainModelVolumeToSurfaceMapperPALS.cxx \
+      BrainModelVolumeToVtkSurfaceMapper.cxx \
+      BrainModelVolumeTopologicalError.cxx \
+      BrainModelVolumeTopologyGraph.cxx \
+      BrainModelVolumeTopologyGraphCorrector.cxx \
+	   BrainModelVolumeVoxelColoring.cxx \
+      BrainSet.cxx \
+      BrainSetAutoLoaderFile.cxx \
+      BrainSetAutoLoaderManager.cxx \
+      BrainSetAutoLoaderFileMetric.cxx \
+      BrainSetAutoLoaderFileMetricByNode.cxx \
+      BrainSetAutoLoaderFileFunctionalVolume.cxx \
+      BrainSetAutoLoaderFilePaintCluster.cxx \
+      BrainSetDataFileReader.cxx \
+      BrainSetMultiThreadedSpecFileReader.cxx \
+	   BrainSetNodeAttribute.cxx \
+	   CellFileProjector.cxx \
+      CellProjectionUnprojector.cxx \
+      DisplaySettings.cxx \
+      DisplaySettingsArealEstimation.cxx \
+      DisplaySettingsBorders.cxx \
+      DisplaySettingsCells.cxx \
+	   DisplaySettingsCoCoMac.cxx \
+	   DisplaySettingsContours.cxx \
+	   DisplaySettingsCuts.cxx \
+	   DisplaySettingsDeformationField.cxx \
+      DisplaySettingsFoci.cxx \
+      DisplaySettingsGeodesicDistance.cxx \
+      DisplaySettingsImages.cxx \
+      DisplaySettingsMetric.cxx \
+	   DisplaySettingsModels.cxx \
+      DisplaySettingsNodeAttributeFile.cxx \
+      DisplaySettingsPaint.cxx \
+	   DisplaySettingsSurface.cxx \
+      DisplaySettingsProbabilisticAtlas.cxx \
+      DisplaySettingsRgbPaint.cxx \
+      DisplaySettingsScene.cxx \
+      DisplaySettingsSection.cxx \
+      DisplaySettingsStudyMetaData.cxx \
+      DisplaySettingsSurfaceShape.cxx \
+      DisplaySettingsTopography.cxx \
+      DisplaySettingsVectors.cxx \
+	   DisplaySettingsVolume.cxx \
+      DisplaySettingsWustlRegion.cxx \
+      FociFileToPalsProjector.cxx \
+      MapFmriAtlasSpecFileInfo.cxx \
+	   MetricsToRgbPaintConverter.cxx \
+      Tessellation.cxx 
diff -pruN 5.6.4~dfsg.1-1/.pc/glu.patch/caret_files/BorderFile.h 5.6.4~dfsg.1-1ubuntu3/.pc/glu.patch/caret_files/BorderFile.h
--- 5.6.4~dfsg.1-1/.pc/glu.patch/caret_files/BorderFile.h	1970-01-01 00:00:00.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/.pc/glu.patch/caret_files/BorderFile.h	2011-06-03 05:19:14.000000000 +0000
@@ -0,0 +1,471 @@
+/*LICENSE_START*/
+/*
+ *  Copyright 1995-2002 Washington University School of Medicine
+ *
+ *  http://brainmap.wustl.edu
+ *
+ *  This file is part of CARET.
+ *
+ *  CARET is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ * 
+ *  CARET is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with CARET; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+/*LICENSE_END*/
+
+
+#ifndef __VE_BORDER_FILE_H__
+#define __VE_BORDER_FILE_H__
+
+#include <QGLWidget>
+
+#include "AbstractFile.h"
+#include "FileException.h"
+#include "SpecFile.h"
+
+class BorderFile;
+class ColorFile;
+class CoordinateFile;
+class TopologyFile;
+class TransformationMatrix;
+
+/// class for storing a single border
+class Border {
+   private:   
+      /// Border File this border belongs to
+      BorderFile* borderFile;
+      
+      /// the link coordinates in this border (3 per link)
+      std::vector<float> linkXYZ;
+      
+      /// the link radii (1 per link)
+      std::vector<float> linkRadii;
+      
+      /// the link flat normal vectors (3 per link)
+      std::vector<float> linkFlatNormal;
+      
+      /// the link section (1 per link)
+      std::vector<int> linkSection;
+      
+      /// name of this border
+      QString name;
+      
+      /// center of border (obsolete and unused)
+      float center[3];
+      
+      /// sampline density of this border
+      float samplingDensity;
+      
+      /// variance of this border
+      float variance;
+      
+      /// topography of this border
+      float topographyValue;
+      
+      /// uncertainty of this border
+      float arealUncertainty;
+      
+      /// index into border color file
+      int borderColorIndex;
+      
+      /// border projection identifier for this border (negative if not from border proj file)
+      int borderProjectionID;
+      
+      /// border display flag (show the border)
+      bool displayFlag;
+      
+      /// border name selected for display flag
+      bool nameDisplayFlag;
+      
+      /// resample a border
+      void resampleBorder(const float* xorig, const float* yorig, 
+                          const float* zorig, 
+                          const int numPointsIn,
+                          const float density,
+                          float* xout, float* yout, float* zout,
+                          const int numPointsOut);
+   public:
+      
+      /// constructor
+      Border(const QString& nameIn = "", const float* centerIn = NULL, 
+             const float samplingDensityIn = 25.0,
+             const float varianceIn = 1.0, 
+             const float topographyIn = 0.0,
+             const float arealUncertaintyIn = 0.0);
+      
+      /// determine if two borders are the same (same name and links)
+      bool operator==(const Border& b) const;
+      
+      /// append a border this "this" one
+      void appendBorder(const Border& b);
+      
+      /// Apply transformation matrix to border
+      void applyTransformationMatrix(TransformationMatrix& tm);
+      
+      /// get the position for a link
+      const float* getLinkXYZ(const int linkNumber) const { return &linkXYZ[linkNumber * 3]; }
+      
+      /// get the position for a link
+      void getLinkXYZ(const int linkNumber, float xyz[3]) const;
+
+      /// set the position of a link
+      void setLinkXYZ(const int linkNumber, const float xyz[3]);
+      
+      /// get the radius for a link
+      float getLinkRadius(const int linkNumber) const;
+      
+      /// set the radius for a link
+      void setLinkRadius(const int linkNumber, const float radius);
+      
+      /// create a border with a subset of the border's links
+      Border* getSubSet(const int linkStart, const int linkEnd) const;
+      
+      /// get the flat normal for a link
+      const float* getLinkFlatNormal(const int linkNumber) const { 
+         return &linkFlatNormal[linkNumber * 3]; 
+      }
+      
+      /// set the flat normal for a link
+      void setLinkFlatNormal(const int linkNumber, const float normal[3]);
+      
+      /// get the section number for a link
+      int getLinkSectionNumber(const int linkNumber) const { return linkSection[linkNumber]; }
+      
+      /// compute flat normals for each link
+      void computeFlatNormals();
+      
+      /// set the section number of a link
+      void setLinkSectionNumber(const int linkNumber, const int section);
+      
+      /// get the topography value
+      float getTopographyValue() const { return topographyValue; }
+
+      /// clear the border links
+      void clearLinks();
+      
+      /// add a border link
+      void addBorderLink(const float xyz[3], const int section = 0, const float radius = 0.0);
+
+      /// insert a border link before the specified link number (use number of links for end)
+      void insertBorderLink(const int linkIndex,
+                            const float xyz[3], 
+                            const int section = 0, 
+                            const float radius = 0.0);
+                            
+      /// find links where another border intersects this border (2D borders in X-Y plane)
+      bool intersection2D(const Border* otherBorder,
+                          const bool thisBorderIsClosed, const bool otherBorderIsClosed,
+                          int& myLinkIntersect, int& otherLinkIntersect) const;
+      
+      /// find first link in "this" border that is within "tolerance" distance
+      /// of a link in "other border"
+      bool intersection3D(const Border* otherBorder,
+                          const float intersectionTolerance,
+                          int& myLinkIntersect, int& otherLinkIntersect) const;
+      
+      /// get total length of a border      
+      float getBorderLength() const;
+      
+      /// get borders attribute data
+      void getData(QString& nameOut, float centerOut[3], 
+                   float& samplingDensityOut, float& varianceOut,
+                   float& topographyOut, float& arealUncertaintyOut) const;
+                   
+      /// get the uncertainty
+      float getArealUncertainty() const { return arealUncertainty; }
+
+      // set the uncertainty
+      void setArealUncertainty(const float uncertainty);
+
+      /// get the sampling density for a border
+      float getSamplingDensity() const { return samplingDensity; }
+      
+      /// get the variance
+      float getVariance() const { return variance; }
+
+      /// set a borders attribute data
+      void setData(const QString& nameIn, const float centerIn[3], 
+                   const float samplingDensityIn, const float varianceIn,
+                   const float topographyIn, const float arealUncertaintyIn);
+
+      /// return a pointer to a border link
+      //BorderLink* getBorderLink(const int i) { return &links[i]; }
+      
+      /// get border color index
+      int getBorderColorIndex() const { return borderColorIndex; }
+      
+      /// set border color index
+      void setBorderColorIndex(const int bci) { borderColorIndex = bci; }
+      
+      /// get border projection identifier
+      int getBorderProjectionID() const { return borderProjectionID; }
+      
+      /// set the border projection identifier
+      void setBorderProjectionID(const int indx) { borderProjectionID = indx; }
+      
+      /// distance between two border links
+      float distanceBetweenLinks(const int link1, const int link2) const;
+      
+      /// get a border's name
+      QString getName() const { return name; }
+      
+      /// set a border's name
+      void setName(const QString& nameIn) { name = nameIn; }
+
+      /// get border selected for display (show the border)
+      bool getDisplayFlag() const { return displayFlag; }
+      
+      /// set border selected for display (show the border)
+      void setDisplayFlag(const bool df) { displayFlag = df; }
+      
+      /// get name selected for display flag
+      bool getNameDisplayFlag() { return nameDisplayFlag; }
+      
+      /// set name selected for display flag
+      void setNameDisplayFlag(const bool df) { nameDisplayFlag = df; }
+      
+      /// return the number of links in this border
+      int getNumberOfLinks() const { return (linkXYZ.size() / 3); }
+      
+      /// get the bounds of border
+      void getBounds(float bounds[6]) const;
+      
+      /// get the center of gravity of the border (returns true if valid)
+      bool getCenterOfGravity(float cogXYZOut[3]) const;
+      
+      /// get the link number nearest to a coordinate
+      int getLinkNumberNearestToCoordinate(const float xyz[3]) const;
+      
+      /// get the link number furthest from a coordinate
+      int getLinkNumberFurthestFromCoordinate(const float xyz[3]) const;
+      
+      /// remove links on negative side of plane
+      void removePointsOnNegativeSideOfPlane(const float planeNormal[3],
+                                             const float pointInPlane[3]);
+      
+      /// orient the links clockwise
+      void orientLinksClockwise();
+      
+      /// orient the links counter-clockwise
+      void orientLinksCounterClockwise();
+      
+      /// See if points are inside a border (border assumed flat in X-Y plane)
+      void pointsInsideBorder2D(const float* points, const int numPoints,
+                                std::vector<bool>& insideFlags,
+                                const bool checkNonNegativeZPointsOnly = false,
+                                const float zMinimum = 0.0) const;
+
+      /// See if 3D points are inside a 3D border (transform all to screen axis)
+      void pointsInsideBorder3D(const GLdouble* modelMatrix,
+                                const GLdouble* projectionMatrix,
+                                const GLint* viewport,
+                                const float* points, 
+                                const int numPoints,
+                                std::vector<bool>& insideFlags,
+                                const bool checkNonNegativeScreenZPointsOnly = true) const;
+
+      /// remove a border link
+      void removeLink(const int linkNumber);
+      
+      // resample a border to the specified density (distance between links)
+      void resampleBorderToDensity(const float density, 
+                                   const int minimumNumberOfLinks,
+                                   int& newNumberOfLinks);
+      
+      /// resample a border so that it has the specified number of links
+      void resampleBorderToNumberOfLinks(const int numberOfLinks);
+      
+      /// reverse the order of the links in a border
+      void reverseBorderLinks();
+      
+      /// remove landmark rater from name of border
+      void removeLandmarkRaterInfoFromBorderName();
+      
+      /// get the character that begins the landmark rater into in a border name
+      static char getLandmarkRaterFirstChar() { return ':'; }
+      
+      /// smooth the border links
+      void smoothBorderLinks(const int numberOfIterations,
+                             const bool closedBorderFlag,
+                             const std::vector<bool>* smoothTheseLinksOnly = NULL);
+      
+      /// remove intersecting loops in a border
+      void removeIntersectingLoops(const char axisXYZ) throw (FileException);
+      
+      /// compare the name of two landmark borders
+      /// only compares text before the semi-colon in the name
+      static bool compareLandmarkBorderNames(const QString& name1, const QString& name2);
+
+      /// interpolate two borders to create new borders (input borders will be resampled too)
+      static void createInterpolatedBorders(Border* b1,
+                                            Border* b2,
+                                            const QString& namePrefix,
+                                            const int numberOfNewBorders,
+                                            const float sampling,
+                                            std::vector<Border*>& outputInterpolatedBorders) throw (FileException);
+                                     
+   friend class BorderFile;
+};
+
+/// class for storing a border file
+class BorderFile : public AbstractFile {
+   private:
+      /// The borders
+      std::vector<Border> borders;
+
+   public:
+      /// constructor      
+      BorderFile(const QString& descriptiveName = "Border File",
+                 const QString& defaultExtensionIn = SpecFile::getBorderFileExtension());
+      
+      /// constructor that creates a border file from the tiles and coordinates
+      BorderFile(const TopologyFile* tf, const CoordinateFile* cf);
+      
+      /// Constructor that creates a BorderFile from the coordinates in a coordinate file.
+      BorderFile(const CoordinateFile* cf, const int maxLinksPerBorder = -1);
+      
+      /// destructor
+      virtual ~BorderFile();
+      
+      /// clear a border file
+      void clear();
+
+      /// copy all the links into a coordinate file
+      void copyLinksToCoordinateFile(CoordinateFile* cf);
+      
+      /// Create a border file that is an average of a group of border files
+      static void createAverageBorderFile(const std::vector<BorderFile*>& inputBorderFiles,
+                                          const float borderResampling,
+                                          const bool sphereFlag,
+                                          BorderFile& averageBorderFileOut)
+                                                 throw (FileException);
+      
+      /// add a border      
+      void addBorder(const Border& b);
+      
+      /// append a border file to this one
+      void append(BorderFile& bf);
+      
+      /// assign colors to the borders
+      void assignColors(const ColorFile& colorFile);
+      
+      /// Apply transformation matrix to border file
+      void applyTransformationMatrix(TransformationMatrix& tm);
+      
+      /// compute the flat border file normals
+      void computeFlatNormals();
+
+      /// returns true if the file is isEmpty (contains no data)
+      bool empty() const { return (getNumberOfBorders() == 0); }
+      
+      /// get the indices of borders that area duplicates of other borders
+      void getDuplicateBorderIndices(std::vector<int>& duplicateBorderIndices) const;
+      
+      /// set status of all border display flags
+      void setAllNameDisplayFlags(const bool status);
+      
+      /// set display flag for borders with specified  name
+      void setNameDisplayFlagForBordersWithName(const QString& name, const bool flag);
+      
+      /// get a specified border by index
+      Border* getBorder(const int i) { return &borders[i]; }
+
+      /// get a specified border by index (const method)
+      const Border* getBorder(const int i) const { return &borders[i]; }
+
+      /// get a specified border by its name
+      Border* getBorderByName(const QString& nameToFind,
+                              const bool landmarkBordersFlag = false);
+
+      /// get a specified border by its name (const method)
+      const Border* getBorderByName(const QString& nameToFind,
+                                    const bool landmarkBordersFlag = false) const;
+
+      /// get a specified border index by its name
+      int getBorderIndexByName(const QString& nameToFind,
+                               const bool landmarkBordersFlag = false) const;
+
+      /// get a border with a projection ID
+      Border* getBorderWithProjectionID(const int projectionID);
+      
+      /// get border index for border with projectionID
+      int getBorderIndexForBorderWithProjectionID(const int projectionID) const;
+      
+      /// get number of borders in this file
+      int getNumberOfBorders() const { return borders.size(); }
+      
+      /// get total number of links in a border file
+      int getTotalNumberOfLinks();
+      
+      /// remove a border from the border file
+      void removeBorder(const int borderNumber);
+      
+      /// remove borders with the specified indices
+      void removeBordersWithIndices(const std::vector<int>& borderIndices);
+      
+      /// remove a border with the projection identifier
+      void removeBorderWithProjectionID(const int projectionID);
+      
+      /// remove all projected borders (projection borders have projection ID >= 0)
+      void removeAllProjectedBorders();
+      
+      /// reset the border projection IDs so not linked to border projections
+      void resetBorderProjectionIDs();
+
+      /// resample displayed borders
+      void resampleDisplayedBorders(const float density);
+
+      /// resample all borders
+      void resampleAllBorders(const float density);
+
+      /// resample to match landmark border file (borders with same names have same number of points)
+      void resampleToMatchLandmarkBorders(const BorderFile& landmarkBorderFile) throw (FileException);
+      
+      /// compute landmark variability
+      static void evaluateLandmarkVariability(const BorderFile& indivBorderFile,
+                                       const BorderFile& atlasBorderFile,
+                                       const float badThreshold,
+                                       const float extremeThreshold,
+                                       const bool useAbsoluteDistanceFlag,
+                                       BorderFile& outputBorderFile,
+                                       QString& outputTextReport) throw (FileException);
+                                       
+      /// orient displayed borders clockwise
+      void orientDisplayedBordersClockwise();
+
+      /// reverse displayed borders
+      void reverseDisplayedBorders();
+
+      /// set the radius of a spherical border file
+      void setSphericalBorderRadius(const float radius);
+      
+      // convert configuration ID to spec file tag
+      static QString convertConfigurationIDToSpecFileTag(const QString& configID);
+      
+      /// write the file's memory in caret6 format to the specified name
+      virtual QString writeFileInCaret6Format(const QString& filenameIn, Structure structure,const ColorFile* colorFileIn, const bool useCaret6ExtensionFlag) throw (FileException);
+
+   protected:
+      /// read the file's data
+      void readFileData(QFile& file, QTextStream& stream, QDataStream& binStream,
+                        QDomElement& /* rootElement */) throw (FileException);
+      
+      /// Write the file's data
+      void writeFileData(QTextStream& stream, QDataStream& binStream,
+                                 QDomDocument& /* xmlDoc */,
+                         QDomElement& /* rootElement */) throw (FileException);
+   
+   friend class Border;
+};
+
+#endif
diff -pruN 5.6.4~dfsg.1-1/.pc/qwt6-linking/caret_qmake_include.pro 5.6.4~dfsg.1-1ubuntu3/.pc/qwt6-linking/caret_qmake_include.pro
--- 5.6.4~dfsg.1-1/.pc/qwt6-linking/caret_qmake_include.pro	1970-01-01 00:00:00.000000000 +0000
+++ 5.6.4~dfsg.1-1ubuntu3/.pc/qwt6-linking/caret_qmake_include.pro	2011-06-03 05:19:14.000000000 +0000
@@ -0,0 +1,363 @@
+CONFIG	+= qt thread
+QT += network opengl xml
+QT -= qt3support
+
+#
+# when missing, it must be the GIFTI API library
+#
+DEFINES += CARET_FLAG
+
+#=================================================================================
+#
+# Check for needed environment variables
+#
+!exists( $(VTK_INC_DIR)/vtkConfigure.h ) {
+error("The environment variable for VTK includes \"VTK_INC_DIR\" not defined.")
+}
+!exists( $(QTDIR)/include/qt.h ) {
+!exists( $(QTDIR)/include/Qt ) {
+    !exists( $(QTDIR)/include/qt4/qt.h ) {
+        !exists( $(QTDIR)/include/qt4/Qt ) {
+            error("The environment variable for QT \"QTDIR\" not defined.")
+        }
+    }
+}
+}
+
+#=================================================================================
+#
+# if this file exists then QT4 is being used
+#
+exists( $(QTDIR)/include/Qt/qicon.h ) {
+DEFINES += CARET_QT4
+QT += network opengl xml
+}
+
+#=================================================================================
+#
+# Update include paths
+#
+
+INCLUDEPATH += \
+../caret_brain_set \
+../caret_command_operations \
+../caret_common \
+../caret_statistics \
+../caret_files \
+../caret_uniformize \
+../caret_widgets \
+../caret_cifti
+
+DEPENDPATH += \
+../caret_brain_set \
+../caret_command_operations \
+../caret_common \
+../caret_statistics \
+../caret_files \
+../caret_uniformize \
+../caret_widgets \
+../caret_cifti
+
+#=================================================================================
+#
+# Is NetCDF/Minc available ?
+#
+exists( $(NETCDF_INC_DIR)/minc.h ) {
+DEFINES += HAVE_MINC
+INCLUDEPATH += $$(NETCDF_INC_DIR)
+NETCDF_LIBS = -L$$(NETCDF_LIB_DIR) \
+                -lminc \
+                -lnetcdf
+
+exists( $(NETCDF_LIB_DIR)/libminc2.a ) {
+    NETCDF_LIBS += -lminc2
+
+    #
+    # Apparently, if libminc2 exists, libminc
+    # may not and is not necessary
+    #
+    !exists( $(NETCDF_LIB_DIR)/libminc.a ) {
+        NETCDF_LIBS -= -lminc
+    }
+}
+exists( $(NETCDF_LIB_DIR)/libminc2.so ) {
+    NETCDF_LIBS += -lminc2
+}
+
+message( "Building with MINC support" )
+}
+
+#
+# Is NetCDF/Minc NOT available
+#
+!exists( $(NETCDF_INC_DIR)/minc.h ) {
+message( "Building WITHOUT MINC support" )
+}
+
+#==============================================================================
+#
+# QWT settings
+#
+exists( $(QWT_INC_DIR)/qwt.h ) {
+   message("Building with QWT support")
+
+   DEFINES += HAVE_QWT
+   INCLUDEPATH	+= $$(QWT_INC_DIR)
+}
+!exists( $(QWT_INC_DIR)/qwt.h ) {
+   message("Building WITHOUT QWT support")
+}
+#==============================================================================
+#
+# VTK settings
+#
+!vs:!nmake:INCLUDEPATH	+= $$(VTK_INC_DIR) #visual studio has separate include dirs for debug and release
+
+#
+# have VTK compiler defines (primarily for GIFTI API)
+#
+DEFINES += HAVE_VTK
+
+#
+# VTK 5.x flag
+#
+DEFINES += HAVE_VTK5
+message( "Building with VTK5 support" )
+
+#
+#
+#
+
+VTK_LIBS_TEMP = -lvtkFiltering \
+            -lvtkGenericFiltering \
+            -lvtkImaging \
+            -lvtkGraphics \
+            -lvtkIO \
+            -lvtkFiltering \
+            -lvtkCommon \
+            -lvtksys \
+            -lvtkjpeg \
+            -lvtkpng \
+            -lvtkexpat \
+            -lvtkzlib
+            
+#==============================================================================
+#==============================================================================
+#
+# There are five major target platforms, Unix, OSX, Windows/Msys, Windows/VisualStudio, Debian/Ubuntu.
+# 
+
+#
+# Windows/Msys Specific
+#
+# qmake doesn't have an OR operator when checking conditionals, so I check for win32, then if it's not vs AND not nmake, assume msys,
+# otherwise it's either vs or nmake.
+win32 {
+	!vs:!nmake {
+		INCLUDEPATH += ../caret_vtk4_classes
+		INCLUDEPATH += $$(VTK_INC_DIR)/vtkmpeg2encode
+		VTK_LIBS = -L$$(VTK_LIB_DIR) $$VTK_LIBS_TEMP
+		exists( $(VTK_INC_DIR)/vtkMPEG2Writer.h ) {
+			message( "Building WITH MPEG support" )
+			DEFINES += HAVE_MPEG
+			VTK_LIBS += -lvtkMPEG2Encode
+		}
+		
+		#
+		# We need to include zlib on windows
+		#
+		!exists( $(ZLIB_INC_DIR)/zlib.h ) {
+		error( "You must define ZLIB_INC_DIR to the ZLIB include files directory.")
+		}
+		CONFIG      += rtti exceptions console
+		INCLUDEPATH += $$(ZLIB_INC_DIR)
+		LIBS        += -L$$(ZLIB_LIB_DIR) -lz
+		contains (DEFINES, HAVE_QWT) {
+			QWT_LIBS = -L$$(QWT_LIB_DIR) -lqwt 
+		}
+	}
+
+#
+# Windows/Visual Studio Specific
+#
+	else {
+		CONFIG(debug,release|debug):INCLUDEPATH	+= $$(VTK_INC_DIR)
+		CONFIG(release,release|debug):INCLUDEPATH	+= $$(VTK_RELEASE_INC_DIR)
+		INCLUDEPATH += ../caret_vtk4_classes
+		CONFIG(debug,release|debug):INCLUDEPATH += $$(VTK_INC_DIR)/vtkmpeg2encode
+		CONFIG(release,release|debug):INCLUDEPATH += $$(VTK_RELEASE_INC_DIR)/vtkmpeg2encode
+		VTK_LIBS = -L$$(VTK_LIB_DIR) $$VTK_LIBS_TEMP
+		VTK_RELEASE_LIBS = -L$$(VTK_RELEASE_LIB_DIR) $$VTK_LIBS_TEMP
+		
+		exists( $(VTK_INC_DIR)/vtkMPEG2Writer.h ) {
+			message( "Building WITH MPEG support" )
+			DEFINES += HAVE_MPEG
+			VTK_LIBS += -lvtkMPEG2Encode
+			VTK_REELEASE_LIBS += -lvtkMPEG2Encode
+		}    
+		
+		#
+		# We need to include zlib on windows
+		#
+		!exists( $(ZLIB_INC_DIR)/zlib.h ) {
+		error( "You must define ZLIB_INC_DIR to the ZLIB include files directory.")
+		}
+		CONFIG      += rtti exceptions console
+		INCLUDEPATH += $$(ZLIB_INC_DIR)
+		LIBS        += -L$$(ZLIB_LIB_DIR) -lzlib
+		
+		contains (DEFINES, HAVE_QWT) {
+			CONFIG(release,release|debug):QWT_LIBS = -L$$(QWT_LIB_DIR) -lqwt 
+			CONFIG(debug,release|debug):QWT_LIBS = -L$$(QWT_LIB_DIR) -lqwtd
+		}
+	}
+}
+#
+# OsX Specific
+# 
+macx {
+    QMAKE_CXXFLAGS   += -fopenmp
+    QMAKE_LFLAGS     += -fopenmp
+    INCLUDEPATH += ../caret_vtk4_classes
+    INCLUDEPATH += $$(VTK_INC_DIR)/vtkmpeg2encode
+    !dll:VTK_LIBS = ../caret_vtk4_classes/libCaretVtk4Classes.a
+    VTK_LIBS += -L$$(VTK_LIB_DIR) $$VTK_LIBS_TEMP
+    
+    exists( $(VTK_INC_DIR)/vtkMPEG2Writer.h ):!ubuntu {
+        message( "Building WITH MPEG support" )
+        DEFINES += HAVE_MPEG
+        VTK_LIBS += -lvtkMPEG2Encode
+    }
+    
+    contains (DEFINES, HAVE_QWT) {
+       QWT_LIBS = -L$$(QWT_LIB_DIR) -lqwt    
+    }    
+
+    #
+    # Target 10.5 if it is available, else 10.6
+    #
+    exists( /Developer/SDKs/MacOSX10.5.sdk ) {
+       QMAKE_CXXFLAGS +=  -isysroot /Developer/SDKs/MacOSX10.5.sdk
+       QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.5
+       QMAKE_LFLAGS_RELEASE += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk
+    }
+    !exists( /Developer/SDKs/MacOSX10.5.sdk ) {
+       exists( /Developer/SDKs/MacOSX10.6.sdk ) {
+          QMAKE_CXXFLAGS +=  -isysroot /Developer/SDKs/MacOSX10.6.sdk
+          QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.6
+          QMAKE_LFLAGS_RELEASE += -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk
+       }
+    }
+
+    QMAKE_LFLAGS_APP += -w
+}
+
+#
+# Debian/Ubuntu Specific
+#
+
+ubuntu {    
+    message ("Building for Ubuntu")
+    QMAKE_CXXFLAGS += -fopenmp -DUBUNTU
+    QMAKE_LFLAGS += -fopenmp
+    VTK_LIBS += -L$$(VTK_LIB_DIR) -lvtkFiltering \
+            -lvtkGenericFiltering \
+            -lvtkImaging \
+            -lvtkGraphics \
+            -lvtkIO \
+            -lvtkFiltering \
+            -lvtkCommon \
+            -lvtksys
+        
+    LIBS += -lpng
+    contains (DEFINES, HAVE_QWT) {
+       QWT_LIBS = -L$$(QWT_LIB_DIR) -lqwt-qt4
+    }
+    DEFINES -= HAVE_MPEG
+    VTK_LIBS -= -lvtkMPEG2Encode
+    exists( $(NETCDF_INC_DIR)/minc.h ) {
+        DEFINES += HAVE_MINC
+        INCLUDEPATH += $$(NETCDF_INC_DIR)
+        NETCDF_LIBS = -L$$(NETCDF_LIB_DIR) \
+                        -lminc2 \
+                        -lnetcdf
+        NETCDF_LIBS -= -lminc
+    }
+}
+
+# 
+# All other Unix variants
+#
+unix:!macx:!ubuntu {
+    contains(QMAKE_CXX, icpc) {
+        #QMAKE_CXXFLAGS   += -openmp -ipo
+        #QMAKE_LFLAGS     += -openmp -openmp-link static -ipo
+        QMAKE_CXXFLAGS   += -openmp
+        QMAKE_LFLAGS     += -openmp -openmp-link static
+    }
+    !contains(QMAKE_CXX, icpc) {
+        QMAKE_CXXFLAGS   += -fopenmp
+        QMAKE_LFLAGS     += -fopenmp
+    }
+    INCLUDEPATH += ../caret_vtk4_classes
+    INCLUDEPATH += $$(VTK_INC_DIR)/vtkmpeg2encode
+    !dll:VTK_LIBS = ../caret_vtk4_classes/libCaretVtk4Classes.a
+    VTK_LIBS += -L$$(VTK_LIB_DIR) $$VTK_LIBS_TEMP
+    exists( $(VTK_INC_DIR)/vtkMPEG2Writer.h ) {
+        message( "Building WITH MPEG support" )
+        DEFINES += HAVE_MPEG
+        VTK_LIBS += -lvtkMPEG2Encode
+    }    
+    contains (DEFINES, HAVE_QWT) {
+        QWT_LIBS = -L$$(QWT_LIB_DIR) -lqwt
+    }
+}
+
+#==============================================================================
+#==============================================================================
+#
+# For build flags, there are two major platforms, Unix and Visual Studio
+#
+#
+# Unix (including msys win32) Build Flags
+#
+!vs:!nmake {
+    release {
+        QMAKE_CXXFLAGS -= -g -O1 -Wl,-O1
+        QMAKE_LFLAGS -= -g -O1 -Wl,-O1
+        QMAKE_CXXFLAGS += -O2 -Wno-deprecated
+        QMAKE_LFLAGS += -O2
+        !debug:!profile:QMAKE_POST_LINK=strip -S $(TARGET)
+    }
+
+    debug {
+        QMAKE_CXXFLAGS += -g -Wno-deprecated
+        QMAKE_LFLAGS += -g
+        QMAKE_CXXFLAGS -= -O2
+        QMAKE_LFLAGS -= -O2
+    }
+
+    profile {
+       QMAKE_CXXFLAGS +=  -pg -O2
+       QMAKE_LFLAGS += -pg
+    } 
+}
+
+#
+# Visual Studio specific build flags
+#
+else:win32 {
+    CONFIG(release,release|debug) {
+        QMAKE_CXXFLAGS_RELEASE -= -O1 -Wl,-O2
+        QMAKE_LFLAGS_RELEASE -= -O1 -Wl,-O2
+        QMAKE_CXXFLAGS_RELEASE += -O2 -D_USE_MATH_DEFINES -wd"4290" -wd"4244" -wd"4267" -wd"4305" -wd"4100" -wd"4005" -MP -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS
+        QMAKE_LFLAGS_RELEASE += -O2 -D_USE_MATH_DEFINES -STACK:10000000
+    }
+
+    CONFIG(debug,release|debug) {
+        QMAKE_CXXFLAGS_DEBUG -= -O2 
+        QMAKE_LFLAGS_DEBUG -= -O2
+        QMAKE_CXXFLAGS_DEBUG += -D_DEBUG -D_USE_MATH_DEFINES -wd"4290" -wd"4244" -wd"4267" -wd"4305" -wd"4100" -wd"4005" -MP -DNOMINMAX -D_CRT_SECURE_NO_WARNINGS
+        QMAKE_LFLAGS_DEBUG += -DEBUG -STACK:10000000
+    }
+}

