Commit 8ee316d4 authored by jcfr's avatar jcfr
Browse files

COMP: Update VTK external project to "slicer-4.0-gamma"

This branch contains the most recent VTK updates

Since VTK now contains a class named vtkImageSlicer, the one in MRMLogics
has been renamed into vtkImageLinearReslicer since it was based on vtkImageReslicer
and specialied for the linear case.

Note also that VTK_LIBRARIES is now exposed by VTKConfig, it means this variable
will contain all the  library built within VTK after the VTK_USE_FILE
is included.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@16344 3bd1e089-480b-0410-8dfb-8563597acbee
parent ac5807f6
...@@ -140,14 +140,6 @@ SET(srcs ${SlicerBaseLogic_SRCS}) ...@@ -140,14 +140,6 @@ SET(srcs ${SlicerBaseLogic_SRCS})
ADD_LIBRARY(${lib_name} ${srcs}) ADD_LIBRARY(${lib_name} ${srcs})
SET(VTK_LIBRARIES
vtkCommon
vtkFiltering
vtkGraphics
vtkIO
vtkHybrid
)
SET(libs SET(libs
MRML MRML
MRMLCLI MRMLCLI
......
...@@ -32,7 +32,7 @@ proc sliceTest {} { ...@@ -32,7 +32,7 @@ proc sliceTest {} {
set slice [vtkImageReslice New] set slice [vtkImageReslice New]
#$slice SetSliceTransform $trans #$slice SetSliceTransform $trans
} else { } else {
set slice [vtkImageSlice New] set slice [vtkImageLinearReslice New]
$slice SetOutputDimensions 512 512 1 $slice SetOutputDimensions 512 512 1
$slice SetSliceTransform $trans $slice SetSliceTransform $trans
} }
......
""" This module loads all the classes from the FreeSurfer library into its """ This module loads all the classes from the FreeSurfer library into its
namespace.""" namespace."""
import os from FreeSurferPython import *
if os.name == 'posix':
from libFreeSurferPython import *
else:
from FreeSurferPython import *
""" This module loads all the classes from the MRML library into its """ This module loads all the classes from the MRML library into its
namespace.""" namespace."""
import os from MRMLPython import *
if os.name == 'posix':
from libMRMLPython import *
else:
from MRMLPython import *
""" This module loads all the classes from the MRML Logic library into its """ This module loads all the classes from the MRML Logic library into its
namespace.""" namespace."""
import os from MRMLLogicPython import *
if os.name == 'posix':
from libMRMLLogicPython import *
else:
from MRMLLogicPython import *
""" This module loads all the classes from the MRMLCLI library into its """ This module loads all the classes from the MRMLCLI library into its
namespace.""" namespace."""
import os from MRMLCLIPython import *
if os.name == 'posix':
from libMRMLCLIPython import *
else:
from MRMLCLIPython import *
""" This module loads all the classes from the RemoteIO library into its """ This module loads all the classes from the RemoteIO library into its
namespace.""" namespace."""
import os from RemoteIOPython import *
if os.name == 'posix':
from libRemoteIOPython import *
else:
from RemoteIOPython import *
""" This module loads all the classes from the vtkSlicerBaseLogic library into its """ This module loads all the classes from the vtkSlicerBaseLogic library into its
namespace.""" namespace."""
import os from SlicerBaseLogicPython import *
if os.name == 'posix':
from libSlicerBaseLogicPython import *
else:
from SlicerBaseLogicPython import *
""" This module loads all the classes from the vtkTeem library into its """ This module loads all the classes from the vtkTeem library into its
namespace.""" namespace."""
import os from vtkTeemPython import *
if os.name == 'posix':
from libvtkTeemPython import *
else:
from vtkTeemPython import *
""" This module loads all the classes from the vtkITK library into its """ This module loads all the classes from the vtkITK library into its
namespace.""" namespace."""
import os from vtkITKPython import *
if os.name == 'posix':
from libvtkITKPython import *
else:
from vtkITKPython import *
...@@ -153,7 +153,7 @@ OPTION(Slicer_USE_CTKAPPLAUNCHER "Configure ctkAppLauncher." ON) ...@@ -153,7 +153,7 @@ OPTION(Slicer_USE_CTKAPPLAUNCHER "Configure ctkAppLauncher." ON)
MARK_AS_ADVANCED(Slicer_USE_CTKAPPLAUNCHER) MARK_AS_ADVANCED(Slicer_USE_CTKAPPLAUNCHER)
SET(Slicer_VTK_GIT_REPOSITORY "github.com/Slicer/VTK.git" CACHE STRING "repository from which to get VTK") SET(Slicer_VTK_GIT_REPOSITORY "github.com/Slicer/VTK.git" CACHE STRING "repository from which to get VTK")
MARK_AS_ADVANCED(Slicer_VTK_GIT_REPOSITORY) MARK_AS_ADVANCED(Slicer_VTK_GIT_REPOSITORY)
SET(Slicer_VTK_GIT_TAG "origin/slicer-4.0" CACHE STRING "VTK git tag to use") SET(Slicer_VTK_GIT_TAG "origin/slicer-4.0-gamma" CACHE STRING "VTK git tag to use")
MARK_AS_ADVANCED(Slicer_VTK_GIT_TAG) MARK_AS_ADVANCED(Slicer_VTK_GIT_TAG)
SET(Slicer_ITK_GIT_REPOSITORY "github.com/Slicer/ITK.git" CACHE STRING "repository from which to get ITK") SET(Slicer_ITK_GIT_REPOSITORY "github.com/Slicer/ITK.git" CACHE STRING "repository from which to get ITK")
MARK_AS_ADVANCED(Slicer_ITK_GIT_REPOSITORY) MARK_AS_ADVANCED(Slicer_ITK_GIT_REPOSITORY)
......
...@@ -102,10 +102,11 @@ SET(VTK_LIBRARIES ...@@ -102,10 +102,11 @@ SET(VTK_LIBRARIES
vtkIO vtkIO
) )
#SET(libs SET(libs
# ) vtkzlib
)
#TARGET_LINK_LIBRARIES(${lib_name} ${libs}) TARGET_LINK_LIBRARIES(${lib_name} ${libs})
FOREACH(c ${VTK_LIBRARIES}) FOREACH(c ${VTK_LIBRARIES})
SET(tcl_wrap) SET(tcl_wrap)
......
...@@ -92,7 +92,7 @@ SET(MRMLLogic_SRCS ...@@ -92,7 +92,7 @@ SET(MRMLLogic_SRCS
# slicer's vtk extensions (filters) # slicer's vtk extensions (filters)
vtkImageLabelOutline.cxx vtkImageLabelOutline.cxx
vtkImageNeighborhoodFilter.cxx vtkImageNeighborhoodFilter.cxx
vtkImageSlice.cxx vtkImageLinearReslice.cxx
vtkImageResliceMask.cxx vtkImageResliceMask.cxx
) )
......
/*========================================================================= /*=========================================================================
Program: Visualization Toolkit Program: Visualization Toolkit
Module: $RCSfile: vtkImageSlice.cxx,v $ Module: $RCSfile: vtkImageLinearReslice.cxx,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved. All rights reserved.
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
PURPOSE. See the above copyright notice for more information. PURPOSE. See the above copyright notice for more information.
=========================================================================*/ =========================================================================*/
#include "vtkImageSlice.h" #include "vtkImageLinearReslice.h"
#include "vtkImageData.h" #include "vtkImageData.h"
#include "vtkInformation.h" #include "vtkInformation.h"
...@@ -35,14 +35,14 @@ ...@@ -35,14 +35,14 @@
#include <float.h> #include <float.h>
#include <math.h> #include <math.h>
vtkCxxRevisionMacro(vtkImageSlice, "$Revision$"); vtkCxxRevisionMacro(vtkImageLinearReslice, "$Revision$");
vtkStandardNewMacro(vtkImageSlice); vtkStandardNewMacro(vtkImageLinearReslice);
// //
// TODO: why? // TODO: why?
//vtkCxxSetObjectMacro(vtkImageSlice,SliceTransform,vtkAbstractTransform); //vtkCxxSetObjectMacro(vtkImageLinearReslice,SliceTransform,vtkAbstractTransform);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
vtkImageSlice::vtkImageSlice() vtkImageLinearReslice::vtkImageLinearReslice()
{ {
// if NULL, the main Input is used // if NULL, the main Input is used
...@@ -76,13 +76,13 @@ vtkImageSlice::vtkImageSlice() ...@@ -76,13 +76,13 @@ vtkImageSlice::vtkImageSlice()
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
vtkImageSlice::~vtkImageSlice() vtkImageLinearReslice::~vtkImageLinearReslice()
{ {
this->SetSliceTransform(NULL); this->SetSliceTransform(NULL);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void vtkImageSlice::PrintSelf(ostream& os, vtkIndent indent) void vtkImageLinearReslice::PrintSelf(ostream& os, vtkIndent indent)
{ {
this->Superclass::PrintSelf(os,indent); this->Superclass::PrintSelf(os,indent);
...@@ -106,7 +106,7 @@ void vtkImageSlice::PrintSelf(ostream& os, vtkIndent indent) ...@@ -106,7 +106,7 @@ void vtkImageSlice::PrintSelf(ostream& os, vtkIndent indent)
} }
// the MTime of the filter // the MTime of the filter
unsigned long int vtkImageSlice::GetMTime() unsigned long int vtkImageLinearReslice::GetMTime()
{ {
unsigned long mTime=this->vtkObject::GetMTime(); unsigned long mTime=this->vtkObject::GetMTime();
unsigned long time; unsigned long time;
...@@ -128,7 +128,7 @@ unsigned long int vtkImageSlice::GetMTime() ...@@ -128,7 +128,7 @@ unsigned long int vtkImageSlice::GetMTime()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// TODO // TODO
int vtkImageSlice::RequestUpdateExtent( int vtkImageLinearReslice::RequestUpdateExtent(
vtkInformation *vtkNotUsed(request), vtkInformation *vtkNotUsed(request),
vtkInformationVector **inputVector, vtkInformationVector **inputVector,
vtkInformationVector *outputVector) vtkInformationVector *outputVector)
...@@ -160,7 +160,7 @@ int vtkImageSlice::RequestUpdateExtent( ...@@ -160,7 +160,7 @@ int vtkImageSlice::RequestUpdateExtent(
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
int vtkImageSlice::FillInputPortInformation(int vtkNotUsed(port), vtkInformation *info) int vtkImageLinearReslice::FillInputPortInformation(int vtkNotUsed(port), vtkInformation *info)
{ {
info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData"); info->Set(vtkAlgorithm::INPUT_REQUIRED_DATA_TYPE(), "vtkImageData");
return 1; return 1;
...@@ -169,7 +169,7 @@ int vtkImageSlice::FillInputPortInformation(int vtkNotUsed(port), vtkInformation ...@@ -169,7 +169,7 @@ int vtkImageSlice::FillInputPortInformation(int vtkNotUsed(port), vtkInformation
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// TODO // TODO
int vtkImageSlice::RequestInformation( int vtkImageLinearReslice::RequestInformation(
vtkInformation *vtkNotUsed(request), vtkInformation *vtkNotUsed(request),
vtkInformationVector ** vtkNotUsed(inputVector), vtkInformationVector ** vtkNotUsed(inputVector),
vtkInformationVector *outputVector) vtkInformationVector *outputVector)
...@@ -196,7 +196,7 @@ int vtkImageSlice::RequestInformation( ...@@ -196,7 +196,7 @@ int vtkImageSlice::RequestInformation(
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// This function executes the filter for any type of data. // This function executes the filter for any type of data.
template <class T> template <class T>
void vtkImageSliceExecute(vtkImageSlice *self, void vtkImageLinearResliceExecute(vtkImageLinearReslice *self,
vtkImageData *inData, vtkImageData *inData,
vtkImageData *outData, T *outPtr, vtkImageData *outData, T *outPtr,
int outExt[6], int id) int outExt[6], int id)
...@@ -328,7 +328,7 @@ void vtkImageSliceExecute(vtkImageSlice *self, ...@@ -328,7 +328,7 @@ void vtkImageSliceExecute(vtkImageSlice *self,
// algorithm to fill the output from the input. // algorithm to fill the output from the input.
// It just executes a switch statement to call the correct function for // It just executes a switch statement to call the correct function for
// the regions data types. // the regions data types.
void vtkImageSlice::ThreadedRequestData( void vtkImageLinearReslice::ThreadedRequestData(
vtkInformation *vtkNotUsed(request), vtkInformation *vtkNotUsed(request),
vtkInformationVector **vtkNotUsed(inputVector), vtkInformationVector **vtkNotUsed(inputVector),
vtkInformationVector *vtkNotUsed(outputVector), vtkInformationVector *vtkNotUsed(outputVector),
...@@ -356,7 +356,7 @@ void vtkImageSlice::ThreadedRequestData( ...@@ -356,7 +356,7 @@ void vtkImageSlice::ThreadedRequestData(
switch (inData[0][0]->GetScalarType()) switch (inData[0][0]->GetScalarType())
{ {
vtkTemplateMacro( vtkTemplateMacro(
vtkImageSliceExecute(this, inData[0][0], outData[0], (VTK_TT *)outPtr, outExt, id) ); vtkImageLinearResliceExecute(this, inData[0][0], outData[0], (VTK_TT *)outPtr, outExt, id) );
default: default:
{ {
vtkErrorMacro(<< "Execute: Unknown ScalarType\n"); vtkErrorMacro(<< "Execute: Unknown ScalarType\n");
......
/*========================================================================= /*=========================================================================
Program: Visualization Toolkit Program: Visualization Toolkit
Module: $RCSfile: vtkImageSlice.h,v $ Module: $RCSfile: vtkImageLinearReslice.h,v $
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved. All rights reserved.
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
PURPOSE. See the above copyright notice for more information. PURPOSE. See the above copyright notice for more information.
=========================================================================*/ =========================================================================*/
/// vtkImageSlice - Slices a volume along a new set of axes. /// vtkImageLinearReslice - Slices a volume along a new set of axes.
/// ///
/// vtkImageSlice uses a vtkMatrix4x4 to pull a slice out of a volume. /// vtkImageLinearReslice uses a vtkMatrix4x4 to pull a slice out of a volume.
/// This is based on David Gobbi's vtkImageReslice, but tries to be more /// This is based on David Gobbi's vtkImageReslice, but tries to be more
/// efficient by only treating the special case of a linear transform /// efficient by only treating the special case of a linear transform
/// .SECTION Caveats /// .SECTION Caveats
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
/// vtkImageReslice vtkAbstractTransform vtkMatrix4x4 /// vtkImageReslice vtkAbstractTransform vtkMatrix4x4
#ifndef __vtkImageSlice_h #ifndef __vtkImageLinearReslice_h
#define __vtkImageSlice_h #define __vtkImageLinearReslice_h
#include "vtkAbstractTransform.h" #include "vtkAbstractTransform.h"
...@@ -40,11 +40,11 @@ class vtkImageData; ...@@ -40,11 +40,11 @@ class vtkImageData;
class vtkAbstractTransform; class vtkAbstractTransform;
class vtkMatrix4x4; class vtkMatrix4x4;
class VTK_MRML_LOGIC_EXPORT vtkImageSlice : public vtkThreadedImageAlgorithm class VTK_MRML_LOGIC_EXPORT vtkImageLinearReslice : public vtkThreadedImageAlgorithm
{ {
public: public:
static vtkImageSlice *New(); static vtkImageLinearReslice *New();
vtkTypeRevisionMacro(vtkImageSlice, vtkThreadedImageAlgorithm); vtkTypeRevisionMacro(vtkImageLinearReslice, vtkThreadedImageAlgorithm);
virtual void PrintSelf(ostream& os, vtkIndent indent); virtual void PrintSelf(ostream& os, vtkIndent indent);
...@@ -124,8 +124,8 @@ public: ...@@ -124,8 +124,8 @@ public:
protected: protected:
vtkImageSlice(); vtkImageLinearReslice();
~vtkImageSlice(); ~vtkImageLinearReslice();
vtkAbstractTransform *SliceTransform; vtkAbstractTransform *SliceTransform;
int InterpolationMode; int InterpolationMode;
...@@ -146,12 +146,12 @@ protected: ...@@ -146,12 +146,12 @@ protected:
virtual int FillInputPortInformation(int port, vtkInformation *info); virtual int FillInputPortInformation(int port, vtkInformation *info);
private: private:
vtkImageSlice(const vtkImageSlice&); /// Not implemented. vtkImageLinearReslice(const vtkImageLinearReslice&); /// Not implemented.
void operator=(const vtkImageSlice&); /// Not implemented. void operator=(const vtkImageLinearReslice&); /// Not implemented.
}; };
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const char *vtkImageSlice::GetInterpolationModeAsString() inline const char *vtkImageLinearReslice::GetInterpolationModeAsString()
{ {
switch (this->InterpolationMode) switch (this->InterpolationMode)
{ {
......
...@@ -59,7 +59,7 @@ vtkMRMLSliceLayerLogic::vtkMRMLSliceLayerLogic() ...@@ -59,7 +59,7 @@ vtkMRMLSliceLayerLogic::vtkMRMLSliceLayerLogic()
this->AssignAttributeScalarsFromTensors->Assign(vtkDataSetAttributes::SCALARS, vtkDataSetAttributes::TENSORS, vtkAssignAttribute::POINT_DATA); this->AssignAttributeScalarsFromTensors->Assign(vtkDataSetAttributes::SCALARS, vtkDataSetAttributes::TENSORS, vtkAssignAttribute::POINT_DATA);
// Create the parts for the scalar layer pipeline // Create the parts for the scalar layer pipeline
this->Slice = vtkImageSlice::New(); this->Slice = vtkImageLinearReslice::New();
this->Reslice = vtkImageResliceMask::New(); this->Reslice = vtkImageResliceMask::New();
this->ResliceThreshold = vtkImageThreshold::New(); this->ResliceThreshold = vtkImageThreshold::New();
this->ResliceAppendComponents = vtkImageAppendComponents::New(); this->ResliceAppendComponents = vtkImageAppendComponents::New();
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
// //
#include "vtkImageResliceMask.h" #include "vtkImageResliceMask.h"
#include "vtkImageReslice.h" #include "vtkImageReslice.h"
#include "vtkImageSlice.h" #include "vtkImageLinearReslice.h"
#include "vtkAssignAttribute.h" #include "vtkAssignAttribute.h"
// STL includes // STL includes
...@@ -93,7 +93,7 @@ public: ...@@ -93,7 +93,7 @@ public:
/// ///
/// The image reslice or slice being used /// The image reslice or slice being used
vtkGetObjectMacro (Slice, vtkImageSlice); vtkGetObjectMacro (Slice, vtkImageLinearReslice);
vtkGetObjectMacro (Reslice, vtkImageResliceMask); vtkGetObjectMacro (Reslice, vtkImageResliceMask);
/// ///
...@@ -209,7 +209,7 @@ protected: ...@@ -209,7 +209,7 @@ protected:
vtkImageCast *ResliceAlphaCast; vtkImageCast *ResliceAlphaCast;
vtkImageLogic *AlphaLogic; vtkImageLogic *AlphaLogic;
vtkImageResliceMask *Reslice; vtkImageResliceMask *Reslice;
vtkImageSlice *Slice; vtkImageLinearReslice *Slice;
vtkImageThreshold *Threshold; vtkImageThreshold *Threshold;
vtkImageLabelOutline *LabelOutline; vtkImageLabelOutline *LabelOutline;
vtkImageAppendComponents *AppendComponents; vtkImageAppendComponents *AppendComponents;
......
...@@ -64,10 +64,6 @@ SET(module_replacements_SRCS ...@@ -64,10 +64,6 @@ SET(module_replacements_SRCS
) )
SET(VTK_LIBRARIES
vtkVolumeRendering
)
# Additional Target libraries # Additional Target libraries
SET(module_replacements_target_libraries SET(module_replacements_target_libraries
${VTK_LIBRARIES} ${VTK_LIBRARIES}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment