Commit 4f5d4ba1 authored by Lisa Avila's avatar Lisa Avila

STYLE: Moving volume rendering classes and tests into a new VolumeRendering kit

parent ab30c75d
......@@ -97,6 +97,8 @@ OPTION(VTK_USE_RENDERING "Build the vtkRendering kit. Needed for displaying dat
OPTION(VTK_USE_PATENTED
"Build the vtkPatented kit. These classes are patented and may require a license to use."
OFF)
VTK_DEPENDENT_OPTION(VTK_USE_VOLUMERENDERING "Build the vtkVolumeRendering kit." OFF
"VTK_USE_RENDERING" OFF)
VTK_DEPENDENT_OPTION(VTK_USE_HYBRID "Build the vtkHybrid kit." OFF
"VTK_USE_RENDERING" OFF)
VTK_DEPENDENT_OPTION(VTK_USE_PARALLEL "Build the vtkParallel kit." OFF
......@@ -111,6 +113,9 @@ SET(VTK_KITS COMMON FILTERING IO GRAPHICS GENERIC_FILTERING IMAGING)
IF(VTK_USE_RENDERING)
SET(VTK_KITS ${VTK_KITS} RENDERING)
ENDIF(VTK_USE_RENDERING)
IF(VTK_USE_VOLUMERENDERING)
SET(VTK_KITS ${VTK_KITS} VOLUMERENDERING)
ENDIF(VTK_USE_VOLUMERENDERING)
IF(VTK_USE_HYBRID)
SET(VTK_KITS ${VTK_KITS} HYBRID)
ENDIF(VTK_USE_HYBRID)
......@@ -451,6 +456,9 @@ ENDIF(VTK_USE_RENDERING)
IF(VTK_USE_PATENTED)
SUBDIRS(Patented)
ENDIF(VTK_USE_PATENTED)
IF(VTK_USE_VOLUMERENDERING)
SUBDIRS(VolumeRendering)
ENDIF(VTK_USE_VOLUMERENDERING)
IF(VTK_USE_HYBRID)
SUBDIRS(Hybrid)
ENDIF(VTK_USE_HYBRID)
......@@ -480,6 +488,9 @@ IF(BUILD_TESTING)
IF(VTK_USE_RENDERING)
SUBDIRS(Rendering/Testing)
ENDIF(VTK_USE_RENDERING)
IF(VTK_USE_VOLUMERENDERING)
SUBDIRS(VolumeRendering/Testing)
ENDIF(VTK_USE_VOLUMERENDERING)
IF(VTK_USE_HYBRID)
SUBDIRS(Hybrid/Testing)
ENDIF(VTK_USE_HYBRID)
......@@ -626,8 +637,6 @@ VTK_DEPENDENT_OPTION(VTK_OPENGL_HAS_OSMESA
VTK_DEPENDENT_OPTION(VTK_USE_MPI
"Use Message Passing Interface (MPI) library for parallel support." OFF
"VTK_USE_PARALLEL" OFF)
VTK_DEPENDENT_OPTION(VTK_USE_VOLUMEPRO "Build VTK with VolumePro support." OFF
"VTK_USE_RENDERING" OFF)
VTK_DEPENDENT_OPTION(VTK_USE_MATROX_IMAGING
"Use Matrox Imaging Library for video input." OFF
"VTK_USE_HYBRID;WIN32" OFF)
......@@ -642,8 +651,7 @@ MARK_AS_ADVANCED(VTK_OPENGL_HAS_OSMESA
VTK_USE_MANGLED_MESA
VTK_USE_MATROX_IMAGING
VTK_USE_MPI
VTK_USE_VIDEO_FOR_WINDOWS
VTK_USE_VOLUMEPRO)
VTK_USE_VIDEO_FOR_WINDOWS)
#-----------------------------------------------------------------------------
# Provide options to use system versions of third-party libraries.
......@@ -689,16 +697,6 @@ IF(VTK_OPENGL_HAS_OSMESA AND VTK_USE_MANGLED_MESA)
"VTK_OPENGL_HAS_OSMESA or VTK_USE_MANGLED_MESA.")
ENDIF(VTK_OPENGL_HAS_OSMESA AND VTK_USE_MANGLED_MESA)
#-----------------------------------------------------------------------------
# Configure VolumePro support.
IF(VTK_USE_VOLUMEPRO)
INCLUDE(${VTK_SOURCE_DIR}/CMake/FindVLI.cmake)
MARK_AS_ADVANCED(VLI_LIBRARY_FOR_VP1000 VLI_INCLUDE_PATH_FOR_VP1000)
IF(VLI_LIBRARY_FOR_VP1000 AND VLI_INCLUDE_PATH_FOR_VP1000)
SET(VTK_HAVE_VP1000 ON)
ENDIF(VLI_LIBRARY_FOR_VP1000 AND VLI_INCLUDE_PATH_FOR_VP1000)
ENDIF(VTK_USE_VOLUMEPRO)
#-----------------------------------------------------------------------------
# Configure Matrox Imaging support.
IF(VTK_USE_MATROX_IMAGING)
......@@ -1025,6 +1023,9 @@ IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
IF(VTK_USE_RENDERING)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h vtkRenderingInstantiator)
ENDIF(VTK_USE_RENDERING)
IF(VTK_USE_VOLUMERENDERING)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h vtkVolumeRenderingInstantiator)
ENDIF(VTK_USE_VOLUMERENDERING)
IF(VTK_USE_HYBRID)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h vtkHybridInstantiator)
ENDIF(VTK_USE_HYBRID)
......
......@@ -135,6 +135,12 @@ Do_not_include_vtkWin32Header_directly__vtkSystemIncludes_includes_it;
#define VTK_RENDERING_EXPORT __declspec( dllimport )
#endif
#if defined(vtkVolumeRendering_EXPORTS)
#define VTK_VOLUMERENDERING_EXPORT __declspec( dllexport )
#else
#define VTK_VOLUMERENDERING_EXPORT __declspec( dllimport )
#endif
#if defined(vtkHybrid_EXPORTS)
#define VTK_HYBRID_EXPORT __declspec( dllexport )
#else
......@@ -160,6 +166,7 @@ Do_not_include_vtkWin32Header_directly__vtkSystemIncludes_includes_it;
#define VTK_IMAGING_EXPORT
#define VTK_IO_EXPORT
#define VTK_RENDERING_EXPORT
#define VTK_VOLUMERENDERING_EXPORT
#define VTK_HYBRID_EXPORT
#define VTK_PARALLEL_EXPORT
#define VTK_PATENTED_EXPORT
......
......@@ -13,7 +13,6 @@ IF (VTK_USE_RENDERING AND VTK_USE_DISPLAY)
IF (VTK_DATA_ROOT)
# add tests that require data
SET(MyTests ${MyTests}
volProt.cxx
MeshQuality.cxx
TestHierarchicalBoxPipeline.cxx
TestMultiBlock.cxx
......
......@@ -17,7 +17,6 @@ IF (VTK_USE_RENDERING)
Plot3DScalars
Plot3DVectors
ParticleReader
gaussian
caffeine
TestXYZMol
TestMHD
......
......@@ -29,11 +29,7 @@ vtkCellPicker.cxx
vtkCuller.cxx
vtkCullerCollection.cxx
vtkDataSetMapper.cxx
vtkDirectionEncoder.cxx
vtkEncodedGradientEstimator.cxx
vtkEncodedGradientShader.cxx
vtkExporter.cxx
vtkFiniteDifferenceGradientEstimator.cxx
vtkFollower.cxx
vtkFrustumCoverageCuller.cxx
vtkGenericRenderWindowInteractor.cxx
......@@ -79,8 +75,6 @@ vtkProp3D.cxx
vtkProp3DCollection.cxx
vtkPropPicker.cxx
vtkProperty.cxx
vtkRayCastImageDisplayHelper.cxx
vtkRecursiveSphereDirectionEncoder.cxx
vtkRenderWindow.cxx
vtkRenderWindowCollection.cxx
vtkRenderWindowInteractor.cxx
......@@ -97,29 +91,10 @@ vtkTextActor3D.cxx
vtkTextMapper.cxx
vtkTextProperty.cxx
vtkTexture.cxx
vtkUnstructuredGridBunykRayCastFunction.cxx
vtkUnstructuredGridHomogeneousRayIntegrator.cxx
vtkUnstructuredGridLinearRayIntegrator.cxx
vtkUnstructuredGridPartialPreIntegration.cxx
vtkUnstructuredGridPreIntegration.cxx
vtkUnstructuredGridVolumeMapper.cxx
vtkUnstructuredGridVolumeRayCastFunction.cxx
vtkUnstructuredGridVolumeRayCastIterator.cxx
vtkUnstructuredGridVolumeRayIntegrator.cxx
vtkUnstructuredGridVolumeRayCastMapper.cxx
vtkUnstructuredGridVolumeZSweepMapper.cxx
vtkVRMLExporter.cxx
vtkVolume.cxx
vtkVolumeCollection.cxx
vtkVolumeMapper.cxx
vtkVolumeProperty.cxx
vtkVolumeRayCastCompositeFunction.cxx
vtkVolumeRayCastFunction.cxx
vtkVolumeRayCastIsosurfaceFunction.cxx
vtkVolumeRayCastMIPFunction.cxx
vtkVolumeRayCastMapper.cxx
vtkVolumeTextureMapper.cxx
vtkVolumeTextureMapper2D.cxx
vtkWindowToImageFilter.cxx
vtkWorldPointPicker.cxx
)
......@@ -140,36 +115,26 @@ SET( KitOpenGL_SRCS
vtkOpenGLPolyDataMapper.cxx
vtkOpenGLPolyDataMapper2D.cxx
vtkOpenGLProperty.cxx
vtkOpenGLRayCastImageDisplayHelper.cxx
vtkOpenGLRenderWindow.cxx
vtkOpenGLRenderer.cxx
vtkOpenGLTexture.cxx
vtkOpenGLVolumeRayCastMapper.cxx
vtkOpenGLVolumeTextureMapper2D.cxx
)
SET_SOURCE_FILES_PROPERTIES(
vtkAbstractMapper3D
vtkAbstractVolumeMapper
vtkAbstractPicker
vtkAbstractPropPicker
vtkCuller
vtkDirectionEncoder
vtkEncodedGradientEstimator
vtkExporter
vtkImporter
vtkInteractorObserver
vtkMapper
vtkOpenGLRenderWindow
vtkProp3D
vtkRayCastImageDisplayHelper
vtkUnstructuredGridVolumeMapper
vtkUnstructuredGridVolumeRayCastFunction
vtkUnstructuredGridVolumeRayCastIterator
vtkUnstructuredGridVolumeRayIntegrator
vtkVolumeMapper
vtkVolumeRayCastFunction
vtkVolumeTextureMapper
vtkKWVolumeMapper
vtkKWVolumeRayCastHelper
ABSTRACT
)
......@@ -268,12 +233,6 @@ CONFIGURE_FILE(
# Build a list of libraries to link to vtkRendering.
IF(VTK_USE_VOLUMEPRO)
IF(VTK_HAVE_VP1000)
SET(KIT_LIBS ${KIT_LIBS} ${VLI_LIBRARY_FOR_VP1000})
ENDIF(VTK_HAVE_VP1000)
ENDIF(VTK_USE_VOLUMEPRO)
IF(VTK_USE_GL2PS)
SET(KIT_LIBS ${KIT_LIBS} ${VTK_ZLIB_LIBRARIES})
ENDIF(VTK_USE_GL2PS)
......@@ -335,12 +294,9 @@ IF (VTK_USE_MANGLED_MESA)
vtkMesaPolyDataMapper.cxx
vtkMesaPolyDataMapper2D.cxx
vtkMesaProperty.cxx
vtkMesaRayCastImageDisplayHelper.cxx
vtkMesaRenderWindow.cxx
vtkMesaRenderer.cxx
vtkMesaTexture.cxx
vtkMesaVolumeRayCastMapper.cxx
vtkMesaVolumeTextureMapper2D.cxx
vtkXMesaRenderWindow.cxx
)
SET(KitOpenGL_SRCS ${KitOpenGL_SRCS}
......
......@@ -18,15 +18,9 @@ IF (VTK_USE_RENDERING)
rendererSource
rotations
ScalarBar
TestBunykRayCastFunction
TestFlyTo
TestHomogeneousRayIntegration
TestLinearRayIntegration
TestLODProp3D
TestOnePoint
TestParallelCoordinates
TestPartialPreIntegration
TestPreIntegration
TestStyleJoystickActor
TestStyleJoystickCamera
TestStyleRubberBandZoom
......@@ -34,12 +28,6 @@ IF (VTK_USE_RENDERING)
TestStyleTrackballActor
TestStyleTrackballCamera
TestTiling
TestZSweep
volRCClipPlanes
volRCCropRegions
volRCRotateClip
volTM2DCropRegions
volTM2DRotateClip
)
ADD_TEST(${tfile}-image ${VTK_EXECUTABLE}
${VTK_SOURCE_DIR}/Common/Testing/Tcl/rtImageTest.tcl
......
......@@ -18,9 +18,9 @@
#include "vtkImageData.h"
#include "vtkMapper.h"
#include "vtkObjectFactory.h"
#include "vtkVolumeMapper.h"
#include "vtkAbstractVolumeMapper.h"
vtkCxxRevisionMacro(vtkCellPicker, "1.35");
vtkCxxRevisionMacro(vtkCellPicker, "1.36");
vtkStandardNewMacro(vtkCellPicker);
vtkCellPicker::vtkCellPicker()
......@@ -49,16 +49,16 @@ double vtkCellPicker::IntersectWithLine(double p1[3], double p2[3], double tol,
double x[3], tMin, t, pcoords[3], minXYZ[3], minPcoords[3];
vtkDataSet *input;
vtkMapper *mapper;
vtkVolumeMapper *volumeMapper;
vtkAbstractVolumeMapper *volumeMapper;
// Get the underlying dataset
if ( (mapper=vtkMapper::SafeDownCast(m)) != NULL )
{
input = mapper->GetInput();
}
else if ( (volumeMapper=vtkVolumeMapper::SafeDownCast(m)) != NULL )
else if ( (volumeMapper=vtkAbstractVolumeMapper::SafeDownCast(m)) != NULL )
{
input = volumeMapper->GetInput();
input = volumeMapper->GetDataSetInput();
}
else
{
......
......@@ -28,9 +28,6 @@
#include "vtkOpenGLPolyDataMapper.h"
#include "vtkOpenGLRenderer.h"
#include "vtkOpenGLTexture.h"
#include "vtkOpenGLVolumeTextureMapper2D.h"
#include "vtkOpenGLVolumeRayCastMapper.h"
#include "vtkOpenGLRayCastImageDisplayHelper.h"
#endif
// Win32 specific stuff
......@@ -72,8 +69,6 @@
#include "vtkMesaRayCastImageDisplayHelper.h"
#include "vtkMesaRenderer.h"
#include "vtkMesaTexture.h"
#include "vtkMesaVolumeTextureMapper2D.h"
#include "vtkMesaVolumeRayCastMapper.h"
#include "vtkXMesaRenderWindow.h"
#endif
......@@ -84,7 +79,7 @@
static vtkSimpleCriticalSection vtkUseMesaClassesCriticalSection;
int vtkGraphicsFactory::UseMesaClasses = 0;
vtkCxxRevisionMacro(vtkGraphicsFactory, "1.35");
vtkCxxRevisionMacro(vtkGraphicsFactory, "1.36");
vtkStandardNewMacro(vtkGraphicsFactory);
const char *vtkGraphicsFactory::GetRenderLibrary()
......@@ -287,36 +282,6 @@ vtkObject* vtkGraphicsFactory::CreateInstance(const char* vtkclassname )
#endif
return vtkOpenGLTexture::New();
}
if(strcmp(vtkclassname, "vtkVolumeTextureMapper2D") == 0)
{
#if defined(VTK_USE_MANGLED_MESA)
if ( vtkGraphicsFactory::UseMesaClasses )
{
return vtkMesaVolumeTextureMapper2D::New();
}
#endif
return vtkOpenGLVolumeTextureMapper2D::New();
}
if(strcmp(vtkclassname, "vtkVolumeRayCastMapper") == 0)
{
#if defined(VTK_USE_MANGLED_MESA)
if ( vtkGraphicsFactory::UseMesaClasses )
{
return vtkMesaVolumeRayCastMapper::New();
}
#endif
return vtkOpenGLVolumeRayCastMapper::New();
}
if(strcmp(vtkclassname, "vtkRayCastImageDisplayHelper") == 0)
{
#if defined(VTK_USE_MANGLED_MESA)
if ( vtkGraphicsFactory::UseMesaClasses )
{
return vtkMesaRayCastImageDisplayHelper::New();
}
#endif
return vtkOpenGLRayCastImageDisplayHelper::New();
}
}
#endif
......
This diff is collapsed.
......@@ -32,11 +32,11 @@
#include "vtkTransform.h"
#include "vtkVertex.h"
#include "vtkVolume.h"
#include "vtkVolumeMapper.h"
#include "vtkAbstractVolumeMapper.h"
#include "vtkBox.h"
#include "vtkImageActor.h"
vtkCxxRevisionMacro(vtkPicker, "1.90");
vtkCxxRevisionMacro(vtkPicker, "1.91");
vtkStandardNewMacro(vtkPicker);
// Construct object with initial tolerance of 1/40th of window. There are no
......@@ -73,7 +73,7 @@ void vtkPicker::MarkPicked(vtkAssemblyPath *path, vtkProp3D *prop3D,
{
int i;
vtkMapper *mapper;
vtkVolumeMapper *volumeMapper;
vtkAbstractVolumeMapper *volumeMapper;
this->SetPath(path);
this->GlobalTMin = tMin;
......@@ -87,9 +87,9 @@ void vtkPicker::MarkPicked(vtkAssemblyPath *path, vtkProp3D *prop3D,
this->DataSet = mapper->GetInput();
this->Mapper = mapper;
}
else if ( (volumeMapper=vtkVolumeMapper::SafeDownCast(m)) != NULL )
else if ( (volumeMapper=vtkAbstractVolumeMapper::SafeDownCast(m)) != NULL )
{
this->DataSet = volumeMapper->GetInput();
this->DataSet = volumeMapper->GetDataSetInput();
this->Mapper = volumeMapper; }
else
{
......
......@@ -17,10 +17,10 @@
#include "vtkImageData.h"
#include "vtkMath.h"
#include "vtkMapper.h"
#include "vtkVolumeMapper.h"
#include "vtkAbstractVolumeMapper.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkPointPicker, "1.33");
vtkCxxRevisionMacro(vtkPointPicker, "1.34");
vtkStandardNewMacro(vtkPointPicker);
vtkPointPicker::vtkPointPicker()
......@@ -38,7 +38,7 @@ double vtkPointPicker::IntersectWithLine(double p1[3], double p2[3], double tol,
double ray[3], rayFactor, tMin, x[3], t, projXYZ[3], minXYZ[3];
vtkDataSet *input;
vtkMapper *mapper;
vtkVolumeMapper *volumeMapper;
vtkAbstractVolumeMapper *volumeMapper;
// Get the underlying dataset
//
......@@ -46,9 +46,9 @@ double vtkPointPicker::IntersectWithLine(double p1[3], double p2[3], double tol,
{
input = mapper->GetInput();
}
else if ( (volumeMapper=vtkVolumeMapper::SafeDownCast(m)) != NULL )
else if ( (volumeMapper=vtkAbstractVolumeMapper::SafeDownCast(m)) != NULL )
{
input = volumeMapper->GetInput();
input = volumeMapper->GetDataSetInput();
}
else
{
......
......@@ -74,8 +74,8 @@ SET(VTK_USE_MPI "@VTK_USE_MPI@")
SET(VTK_USE_PARALLEL "@VTK_USE_PARALLEL@")
SET(VTK_USE_PATENTED "@VTK_USE_PATENTED@")
SET(VTK_USE_RENDERING "@VTK_USE_RENDERING@")
SET(VTK_USE_VOLUMERENDERING "@VTK_USE_VOLUMERENDERING@")
SET(VTK_USE_VIDEO_FOR_WINDOWS "@VTK_USE_VIDEO_FOR_WINDOWS@")
SET(VTK_USE_VOLUMEPRO "@VTK_USE_VOLUMEPRO@")
SET(VTK_USE_GL2PS "@VTK_USE_GL2PS@")
SET(VTK_USE_X "@VTK_USE_X@")
SET(VTK_WRAP_JAVA "@VTK_WRAP_JAVA@")
......
SET(KIT VolumeRendering)
SET(UKIT VOLUMERENDERING)
SET(KIT_TCL_LIBS vtkRenderingTCL vtkIOTCL)
IF(APPLE)
SET(KIT_PYTHON_LIBS vtkRenderingPythonD vtkIOPythonD)
ELSE(APPLE)
SET(KIT_PYTHON_LIBS vtkRenderingPython vtkIOPython)
ENDIF(APPLE)
SET(KIT_JAVA_LIBS vtkRenderingJava vtkIOJava)
SET(KIT_LIBS vtkRendering vtkIO)
IF(VTK_USE_PATENTED)
SET(KIT_TCL_LIBS ${KIT_TCL_LIBS} vtkPatentedTCL)
IF(APPLE)
SET(KIT_PYTHON_LIBS ${KIT_PYTHON_LIBS} vtkPatentedPythonD)
ELSE(APPLE)
SET(KIT_PYTHON_LIBS ${KIT_PYTHON_LIBS} vtkPatentedPython)
ENDIF(APPLE)
SET(KIT_JAVA_LIBS ${KIT_JAVA_LIBS} vtkPatentedJava)
SET(KIT_LIBS ${KIT_LIBS} vtkPatented)
ENDIF(VTK_USE_PATENTED)
SET ( Kit_SRCS
vtkDirectionEncoder.cxx
vtkEncodedGradientEstimator.cxx
vtkEncodedGradientShader.cxx
vtkFiniteDifferenceGradientEstimator.cxx
vtkRayCastImageDisplayHelper.cxx
vtkRecursiveSphereDirectionEncoder.cxx
vtkVolumeMapper.cxx
vtkVolumeRayCastCompositeFunction.cxx
vtkVolumeRayCastFunction.cxx
vtkVolumeRayCastIsosurfaceFunction.cxx
vtkVolumeRayCastMIPFunction.cxx
vtkVolumeRayCastMapper.cxx
vtkVolumeRenderingFactory.cxx
vtkVolumeTextureMapper.cxx
vtkVolumeTextureMapper2D.cxx
vtkUnstructuredGridBunykRayCastFunction.cxx
vtkUnstructuredGridHomogeneousRayIntegrator.cxx
vtkUnstructuredGridLinearRayIntegrator.cxx
vtkUnstructuredGridPartialPreIntegration.cxx
vtkUnstructuredGridPreIntegration.cxx
vtkUnstructuredGridVolumeMapper.cxx
vtkUnstructuredGridVolumeRayCastFunction.cxx
vtkUnstructuredGridVolumeRayCastIterator.cxx
vtkUnstructuredGridVolumeRayIntegrator.cxx
vtkUnstructuredGridVolumeRayCastMapper.cxx
vtkUnstructuredGridVolumeZSweepMapper.cxx
)
SET( KitOpenGL_SRCS
vtkOpenGLRayCastImageDisplayHelper.cxx
vtkOpenGLVolumeTextureMapper2D.cxx
)
SET_SOURCE_FILES_PROPERTIES(
vtkDirectionEncoder
vtkEncodedGradientEstimator
vtkRayCastImageDisplayHelper
vtkVolumeMapper
vtkVolumeRayCastFunction
vtkVolumeTextureMapper
vtkUnstructuredGridVolumeMapper
vtkUnstructuredGridVolumeRayCastFunction
vtkUnstructuredGridVolumeRayCastIterator
vtkUnstructuredGridVolumeRayIntegrator
ABSTRACT
)
IF (VTK_USE_MANGLED_MESA)
IF (MANGLED_MESA_LIBRARY)
SET ( KitOpenGL_SRCS ${KitOpenGL_SRCS}
vtkMesaRayCastImageDisplayHelper.cxx
vtkMesaVolumeTextureMapper2D.cxx
)
SET (KIT_LIBS ${KIT_LIBS} ${MANGLED_MESA_LIBRARY})
IF(MANGLED_OSMESA_LIBRARY)
SET( KIT_LIBS ${KIT_LIBS} ${MANGLED_OSMESA_LIBRARY} )
ENDIF(MANGLED_OSMESA_LIBRARY)
ENDIF (MANGLED_MESA_LIBRARY)
ELSE (VTK_USE_MANGLED_MESA)
IF(VTK_OPENGL_HAS_OSMESA)
IF (OSMESA_LIBRARY)
SET(KIT_LIBS ${KIT_LIBS} ${OSMESA_LIBRARY})
ENDIF (OSMESA_LIBRARY)
ENDIF(VTK_OPENGL_HAS_OSMESA)
ENDIF(VTK_USE_MANGLED_MESA)
SET(Kit_SRCS ${Kit_SRCS} ${KitOpenGL_SRCS})
SET(Kit_EXTRA_SRCS)
SET(Kit_EXTRA_CMDS)
SET(Kit_TCL_EXTRA_SRCS)
SET(Kit_PYTHON_EXTRA_SRCS)
SET(Kit_JAVA_EXTRA_SRCS)
# -----------------------------------------------------------------
# Start of common section
# Setup vtkInstantiator registration for this library's classes.
VTK_MAKE_INSTANTIATOR3(vtk${KIT}Instantiator KitInstantiator_SRCS
"${Kit_SRCS}"
VTK_${UKIT}_EXPORT
${VTK_BINARY_DIR} "")
ADD_LIBRARY(vtk${KIT} ${Kit_SRCS} ${Kit_EXTRA_SRCS} ${KitInstantiator_SRCS})
# Allow the user to customize their build with some local options
#
SET(LOCALUSERMACRODEFINED 0)
INCLUDE (${VTK_BINARY_DIR}/${KIT}/LocalUserOptions.cmake OPTIONAL)
INCLUDE (${VTK_SOURCE_DIR}/${KIT}/LocalUserOptions.cmake OPTIONAL)
# if we are wrapping into Tcl then add the library and extra
# source files
#
IF (VTK_WRAP_TCL)
VTK_WRAP_TCL3(vtk${KIT}TCL KitTCL_SRCS
"${Kit_SRCS}"
"${Kit_TCL_EXTRA_CMDS}")
ADD_LIBRARY(vtk${KIT}TCL ${KitTCL_SRCS} ${Kit_TCL_EXTRA_SRCS})
TARGET_LINK_LIBRARIES (vtk${KIT}TCL vtk${KIT} ${KIT_TCL_LIBS})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}TCL)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
ENDIF (VTK_WRAP_TCL)
# if we are wrapping into Python then add the library and extra
# source files
#
IF (VTK_WRAP_PYTHON)
VTK_WRAP_PYTHON3(vtk${KIT}Python KitPython_SRCS "${Kit_SRCS}")
IF (APPLE)
ADD_LIBRARY(vtk${KIT}PythonD ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
ADD_LIBRARY(vtk${KIT}Python MODULE vtk${KIT}PythonInit.cxx)
TARGET_LINK_LIBRARIES(vtk${KIT}PythonD vtk${KIT} ${KIT_PYTHON_LIBS}
${VTK_PYTHON_LIBRARIES})
TARGET_LINK_LIBRARIES(vtk${KIT}Python vtk${KIT}PythonD)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}PythonD)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
ELSE (APPLE)
ADD_LIBRARY(vtk${KIT}Python MODULE ${KitPython_SRCS} ${Kit_PYTHON_EXTRA_SRCS})
TARGET_LINK_LIBRARIES (vtk${KIT}Python vtk${KIT} ${KIT_PYTHON_LIBS})
ENDIF(APPLE)
IF(WIN32)
TARGET_LINK_LIBRARIES (vtk${KIT}Python ${VTK_PYTHON_LIBRARIES})
ENDIF(WIN32)
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}Python)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
ENDIF (VTK_WRAP_PYTHON)
# if we are wrapping into Java then add the library and extra
# source files
#
IF (VTK_WRAP_JAVA)
VTK_WRAP_JAVA3(vtk${KIT}Java KitJava_SRCS "${Kit_SRCS}")
ADD_LIBRARY(vtk${KIT}Java SHARED ${KitJava_SRCS} ${Kit_JAVA_EXTRA_SRCS})
TARGET_LINK_LIBRARIES(vtk${KIT}Java vtk${KIT} ${KIT_JAVA_LIBS})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT}Java)
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
ENDIF (VTK_WRAP_JAVA)
TARGET_LINK_LIBRARIES(vtk${KIT} ${KIT_LIBS})
IF(NOT VTK_INSTALL_NO_LIBRARIES)
INSTALL_TARGETS(${VTK_INSTALL_LIB_DIR} vtk${KIT})
ENDIF(NOT VTK_INSTALL_NO_LIBRARIES)
IF(NOT VTK_INSTALL_NO_DEVELOPMENT)
INSTALL_FILES(${VTK_INSTALL_INCLUDE_DIR} .h ${Kit_SRCS})
ENDIF(NOT VTK_INSTALL_NO_DEVELOPMENT)
VTK_EXPORT_KIT("${KIT}" "${UKIT}" "${Kit_SRCS}")
# If the user defined a custom macro, execute it now and pass in all the srcs
#
IF(LOCALUSERMACRODEFINED)
LocalUserOptionsMacro( "${Kit_SRCS}" "${Kit_EXTRA_SRCS}"
"${KitTCL_SRCS}" "${Kit_TCL_EXTRA_SRCS}"
"${KitJava_SRCS}" "${Kit_JAVA_EXTRA_SRCS}"
"${KitPython_SRCS}" "${Kit_PYTHON_EXTRA_SRCS}")
ENDIF(LOCALUSERMACRODEFINED)
# End of common section
# -----------------------------------------------------------------
# No Cxx tests right now...
# SUBDIRS(Cxx)
IF (VTK_WRAP_TCL)
SUBDIRS(Tcl)
ENDIF (VTK_WRAP_TCL)
# if we are using the display add the tests
IF (VTK_USE_DISPLAY)
SET(KIT VolumeRendering)
IF (VTK_DATA_ROOT)
# add tests that require data
SET(MyTests
volProt.cxx
)
ENDIF (VTK_DATA_ROOT)
CREATE_TEST_SOURCELIST(Tests ${KIT}CxxTests.cxx ${MyTests}
EXTRA_INCLUDE vtkSuppressCrtDbgWarning.h
FUNCTION vtkSuppressCrtDbgWarning)
ADD_EXECUTABLE(${KIT}CxxTests ${Tests} }
TARGET_LINK_LIBRARIES(${KIT}CxxTests vtkVolumeRendering)
SET (TestsToRun ${Tests})
REMOVE (TestsToRun ${KIT}CxxTests.cxx)
#
# Add all the executables
FOREACH (test ${TestsToRun})
GET_FILENAME_COMPONENT(TName ${test} NAME_WE)
IF (VTK_DATA_ROOT)
ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName}
-D ${VTK_DATA_ROOT}
-T ${VTK_BINARY_DIR}/Testing/Temporary
-V Baseline/${KIT}/${TName}.png)
ELSE (VTK_DATA_ROOT)
ADD_TEST(${TName} ${CXX_TEST_PATH}/${KIT}CxxTests ${TName})
ENDIF (VTK_DATA_ROOT)
ENDFOREACH (test)
ENDIF (VTK_USE_DISPLAY)
IF (VTK_USE_RENDERING AND VTK_USE_VOLUMERENDERING)
#
# Add tests, with the data
#
IF (VTK_DATA_ROOT)
FOREACH ( tfile
gaussian
TestBunykRayCastFunction
TestHomogeneousRayIntegration
TestLinearRayIntegration
TestLODProp3D
TestPartialPreIntegration
TestPreIntegration
TestZsweep
volRCClipPlanes
volRCCropRegions
volRCRotateClip
volTM2DCropRegions
volTM2DRotateClip
)
ADD_TEST(${tfile}-image ${VTK_EXECUTABLE}
${VTK_SOURCE_DIR}/Common/Testing/Tcl/rtImageTest.tcl
${VTK_SOURCE_DIR}/VolumeRendering/Testing/Tcl/${tfile}.tcl
-D ${VTK_DATA_ROOT}
-V Baseline/VolumeRendering/${tfile}.png
-A ${VTK_SOURCE_DIR}/Wrapping/Tcl)
ENDFOREACH( tfile )
#
# If we do not have the data, still run the tests that we can
#
ELSE (VTK_DATA_ROOT)