Commit 1d3ab2bf authored by promayon's avatar promayon
Browse files

FIXED removing backup files from SVN

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@169 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 2c75ff6c
set(EXTENSION_NAME "itkfiltersextension")
cmake_minimum_required(VERSION 2.6)
project(${EXTENSION_NAME})
include(FindCamiTK.cmake)
include(CreateLaunchers)
action_extension(DEFAULT
NEEDS_ITK
LIBRARIES ITKBasicFilters ITKCommon ITKIO
)
# For Microsoft Visual C++, sets the default application to imp for the "ALL_BUILD" project
# (i.e. launches imp when we you click on "Debug" or "Start Without Debugging" button on Visual)
# In addition, but not the least, sets the environment to the debug dll directory for VTK (and ITK)
# to solve the dll incompatibility between debug and relase version of QVTK.dll and ITKCommon.dll
if ( MSVC )
create_default_target_launcher_special(
"imp"
EXTERNAL_COMMAND "${CAMITK_BIN_DIR}$(OutDir)/imp.exe"
RUNTIME_LIBRARY_DIRS "${CAMITK_BIN_DIR}$(OutDir)" "%VTK_DIR%/bin/$(OutDir)" "%ITK_DIR%/bin/$(OutDir)"
)
endif()
vtkSmartPointer<vtkImageData> GradientMagnitudeRecursiveGaussian::implementProcess(vtkSmartPointer<vtkImageData> img)
{
vtkSmartPointer<vtkImageData> result = NULL;
if (img == NULL)
return result;
int * dims = img->GetDimensions();
int dim = 0;
if (dims[2] == 0)
dim = 2;
else
dim = 3;
int scalarType = img->GetScalarType();
switch (scalarType)
{
case VTK_CHAR :
if (dim == 2)
result = itkProcess<char, double, 2>(img);
else // if dim == 3
result = itkProcess<char, double, 3>(img);
break;
case VTK_UNSIGNED_CHAR :
if (dim == 2)
result = itkProcess<unsigned char, double, 2>(img);
else // if dim == 3
result = itkProcess<unsigned char, double, 3>(img);
break;
case VTK_SIGNED_CHAR :
if (dim == 2)
result = itkProcess<signed char, double, 2>(img);
else // if dim == 3
result = itkProcess<signed char, double, 3>(img);
break;
case VTK_SHORT :
if (dim == 2)
result = itkProcess<short, double, 2>(img);
else // if dim == 3
result = itkProcess<short, double, 3>(img);
break;
case VTK_UNSIGNED_SHORT :
if (dim == 2)
result = itkProcess<unsigned short, double, 2>(img);
else // if dim == 3
result = itkProcess<unsigned short, double, 3>(img);
break;
case VTK_INT :
if (dim == 2)
result = itkProcess<int, double, 2>(img);
else // if dim == 3
result = itkProcess<int, double, 3>(img);
break;
case VTK_UNSIGNED_INT :
if (dim == 2)
result = itkProcess<unsigned int, double, 2>(img);
else // if dim == 3
result = itkProcess<unsigned int, double, 3>(img);
break;
case VTK_LONG :
if (dim == 2)
result = itkProcess<long, double, 2>(img);
else // if dim == 3
result = itkProcess<long, double, 3>(img);
break;
case VTK_UNSIGNED_LONG :
if (dim == 2)
result = itkProcess<unsigned long, double, 2>(img);
else // if dim == 3
result = itkProcess<unsigned long, double, 3>(img);
break;
case VTK_FLOAT :
if (dim == 2)
result = itkProcess<float, double, 2>(img);
else // if dim == 3
result = itkProcess<float, double, 3>(img);
break;
case VTK_DOUBLE :
if (dim == 2)
result = itkProcess<double, double, 2>(img);
else // if dim == 3
result = itkProcess<double, double, 3>(img);
break;
default :
break;
}
return result;
}
vtkSmartPointer<vtkImageData> GradientMagnitude::implementProcess(vtkSmartPointer<vtkImageData> img)
{
vtkSmartPointer<vtkImageData> result = NULL;
if (img == NULL)
return result;
int * dims = img->GetDimensions();
int dim = 0;
if (dims[2] == 0)
dim = 2;
else
dim = 3;
int scalarType = img->GetScalarType();
switch (scalarType)
{
case VTK_CHAR :
if (dim == 2)
result = itkProcess<char, double, 2>(img);
else // if dim == 3
result = itkProcess<char, double, 3>(img);
break;
case VTK_UNSIGNED_CHAR :
if (dim == 2)
result = itkProcess<unsigned char, double, 2>(img);
else // if dim == 3
result = itkProcess<unsigned char, double, 3>(img);
break;
case VTK_SIGNED_CHAR :
if (dim == 2)
result = itkProcess<signed char, double, 2>(img);
else // if dim == 3
result = itkProcess<signed char, double, 3>(img);
break;
case VTK_SHORT :
if (dim == 2)
result = itkProcess<short, double, 2>(img);
else // if dim == 3
result = itkProcess<short, double, 3>(img);
break;
case VTK_UNSIGNED_SHORT :
if (dim == 2)
result = itkProcess<unsigned short, double, 2>(img);
else // if dim == 3
result = itkProcess<unsigned short, double, 3>(img);
break;
case VTK_INT :
if (dim == 2)
result = itkProcess<int, double, 2>(img);
else // if dim == 3
result = itkProcess<int, double, 3>(img);
break;
case VTK_UNSIGNED_INT :
if (dim == 2)
result = itkProcess<unsigned int, double, 2>(img);
else // if dim == 3
result = itkProcess<unsigned int, double, 3>(img);
break;
case VTK_LONG :
if (dim == 2)
result = itkProcess<long, double, 2>(img);
else // if dim == 3
result = itkProcess<long, double, 3>(img);
break;
case VTK_UNSIGNED_LONG :
if (dim == 2)
result = itkProcess<unsigned long, double, 2>(img);
else // if dim == 3
result = itkProcess<unsigned long, double, 3>(img);
break;
case VTK_FLOAT :
if (dim == 2)
result = itkProcess<float, double, 2>(img);
else // if dim == 3
result = itkProcess<float, double, 3>(img);
break;
case VTK_DOUBLE :
if (dim == 2)
result = itkProcess<double, double, 2>(img);
else // if dim == 3
result = itkProcess<double, double, 3>(img);
break;
default :
break;
}
return result;
}
vtkSmartPointer<vtkImageData> SobelEdgeDetection::implementProcess(vtkSmartPointer<vtkImageData> img)
{
vtkSmartPointer<vtkImageData> result = NULL;
if (img == NULL)
return result;
int * dims = img->GetDimensions();
int dim = 0;
if (dims[2] == 0)
dim = 2;
else
dim = 3;
int scalarType = img->GetScalarType();
switch (scalarType)
{
case VTK_CHAR :
if (dim == 2)
result = itkProcess<char, char, 2>(img);
else // if dim == 3
result = itkProcess<char, char, 3>(img);
break;
case VTK_UNSIGNED_CHAR :
if (dim == 2)
result = itkProcess<unsigned char, unsigned char, 2>(img);
else // if dim == 3
result = itkProcess<unsigned char, unsigned char, 3>(img);
break;
case VTK_SIGNED_CHAR :
if (dim == 2)
result = itkProcess<signed char, signed char, 2>(img);
else // if dim == 3
result = itkProcess<signed char, signed char, 3>(img);
break;
case VTK_SHORT :
if (dim == 2)
result = itkProcess<short, short, 2>(img);
else // if dim == 3
result = itkProcess<short, short, 3>(img);
break;
case VTK_UNSIGNED_SHORT :
if (dim == 2)
result = itkProcess<unsigned short, unsigned short, 2>(img);
else // if dim == 3
result = itkProcess<unsigned short, unsigned short, 3>(img);
break;
case VTK_INT :
if (dim == 2)
result = itkProcess<int, int, 2>(img);
else // if dim == 3
result = itkProcess<int, int, 3>(img);
break;
case VTK_UNSIGNED_INT :
if (dim == 2)
result = itkProcess<unsigned int, unsigned int, 2>(img);
else // if dim == 3
result = itkProcess<unsigned int, unsigned int, 3>(img);
break;
case VTK_LONG :
if (dim == 2)
result = itkProcess<long, long, 2>(img);
else // if dim == 3
result = itkProcess<long, long, 3>(img);
break;
case VTK_UNSIGNED_LONG :
if (dim == 2)
result = itkProcess<unsigned long, unsigned long, 2>(img);
else // if dim == 3
result = itkProcess<unsigned long, unsigned long, 3>(img);
break;
case VTK_FLOAT :
if (dim == 2)
result = itkProcess<float, float, 2>(img);
else // if dim == 3
result = itkProcess<float, float, 3>(img);
break;
case VTK_DOUBLE :
if (dim == 2)
result = itkProcess<double, double, 2>(img);
else // if dim == 3
result = itkProcess<double, double, 3>(img);
break;
default :
break;
}
return result;
}
set(EXTENSION_NAME "itksegmentationextension")
cmake_minimum_required(VERSION 2.6)
project(${EXTENSION_NAME})
include(FindCamiTK.cmake)
include(CreateLaunchers)
action_extension(DEFAULT
NEEDS_ITK
LIBRARIES ITKBasicFilters ITKCommon ITKIO
)
# For Microsoft Visual C++, sets the default application to imp for the "ALL_BUILD" project
# (i.e. launches imp when we you click on "Debug" or "Start Without Debugging" button on Visual)
# In addition, but not the least, sets the environment to the debug dll directory for VTK (and ITK)
# to solve the dll incompatibility between debug and relase version of QVTK.dll and ITKCommon.dll
if ( MSVC )
create_default_target_launcher_special(
"imp"
EXTERNAL_COMMAND "${CAMITK_BIN_DIR}$(OutDir)/imp.exe"
RUNTIME_LIBRARY_DIRS "${CAMITK_BIN_DIR}$(OutDir)" "%VTK_DIR%/bin/$(OutDir)" "%ITK_DIR%/bin/$(OutDir)"
)
endif()
Supports Markdown
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