##=========================================================================
## 
##   Copyright (c) Kitware, Inc.
##   All rights reserved.
##   See Copyright.txt or http://www.kitware.com/VolViewCopyright.htm for details.
## 
##      This software is distributed WITHOUT ANY WARRANTY; without even
##      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
##      PURPOSE.  See the above copyright notice for more information.
## 
##=========================================================================
INCLUDE_REGULAR_EXPRESSION("^.*$")
IF( KWVolView_USE_PSF_ESTIMATION )

  ADD_EXECUTABLE( TestPhantomPositionEstimator TestPhantomPositionEstimator.cxx )
  TARGET_LINK_LIBRARIES( TestPhantomPositionEstimator ITKAlgorithms ITKCommon ITKBasicFilters ITKIO )

  ADD_EXECUTABLE( TestPhantomDensityCalculator TestPhantomDensityCalculator.cxx )
  TARGET_LINK_LIBRARIES( TestPhantomDensityCalculator ITKAlgorithms ITKCommon ITKBasicFilters ITKIO )

  ADD_EXECUTABLE( TestPhantomLocationCalculator TestPhantomLocationCalculator.cxx )
  TARGET_LINK_LIBRARIES( TestPhantomLocationCalculator ITKAlgorithms ITKCommon ITKBasicFilters ITKIO )

  # Bit detection test...
  #
  # 1. TestPhantomBoundingBoxCalculator /mnt/KarthikUSB/Kitware/Data/PSFEstimation/SecondGen-PHANTOM-17-Nov-2010/Data.mha /tmp/PhantomRegion2.mha -64.9751 10.5497 -289.556 -62.1099 13.987 -220.233 /tmp/PhantomCylinder2.mha /tmp/PhantomCentralBits2.mha 
  # {Answer: Model number: [0,0,0] Serial number: [1,0,1,0,0,0,0,0,0]}
  #
  # 2. 160 -18 -188 153 -19 -160 {Model [-1]}
  #
  # 3. 83 13.5 -104 78 14.5 -172 {Model [000] Serial [0,0,1,0,0,0,0,0,0]}
  

  ADD_EXECUTABLE( TestPhantomBoundingBoxCalculator TestPhantomBoundingBoxCalculator.cxx )
  TARGET_LINK_LIBRARIES( TestPhantomBoundingBoxCalculator ITKAlgorithms ITKCommon ITKBasicFilters ITKIO )

  ADD_EXECUTABLE( TestNormalizedSpherePointGenerator TestNormalizedSpherePointGenerator.cxx )
  TARGET_LINK_LIBRARIES( TestNormalizedSpherePointGenerator vtkGraphics KWVolView vtkIO vtkFiltering )

  ADD_EXECUTABLE( TestPhantomSegmentationUsingLSTK TestPhantomSegmentationUsingLSTK.cxx )
  TARGET_LINK_LIBRARIES( TestPhantomSegmentationUsingLSTK KWVolView ITKIO ITKBasicFilters ITKCommon )

  ADD_EXECUTABLE( TestScalarSphericalSurfaceIntegral TestScalarSphericalSurfaceIntegral.cxx )
  TARGET_LINK_LIBRARIES( TestScalarSphericalSurfaceIntegral vtkImaging vtkGraphics KWVolView vtkIO vtkFiltering )

  ADD_EXECUTABLE( TestSweptScalarSphericalSurfaceIntegral TestSweptScalarSphericalSurfaceIntegral.cxx )
  TARGET_LINK_LIBRARIES( TestSweptScalarSphericalSurfaceIntegral vtkImaging vtkGraphics KWVolView vtkIO vtkFiltering )

  ADD_EXECUTABLE( SphereLaplacianVolumetricBias SphereLaplacianVolumetricBias.cxx )
  TARGET_LINK_LIBRARIES( SphereLaplacianVolumetricBias 
    vtkImaging vtkGraphics vtkCommon KWVolView vtkIO vtkFiltering ITKIO ITKCommon ITKBasicFilters )  

  ADD_EXECUTABLE( SphereLaplacianVolumetricBiases SphereLaplacianVolumetricBiases.cxx )
  TARGET_LINK_LIBRARIES( SphereLaplacianVolumetricBiases
    vtkImaging vtkGraphics vtkCommon KWVolView vtkIO vtkFiltering ITKIO ITKCommon ITKBasicFilters )  
ENDIF( KWVolView_USE_PSF_ESTIMATION )
