remove redundent files

This commit is contained in:
Samuel Li 2016-07-19 10:06:48 -06:00
parent 6bfb1deb94
commit 16528df5ba
5 changed files with 0 additions and 436 deletions

@ -50,7 +50,6 @@ set(headers
#-----------------------------------------------------------------------------
add_subdirectory(internal)
add_subdirectory(splatkernels)
# add_subdirectory(wavelet)
vtkm_declare_headers(${headers})

@ -1,28 +0,0 @@
##============================================================================
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt 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.
##
## Copyright 2016 Sandia Corporation.
## Copyright 2016 UT-Battelle, LLC.
## Copyright 2016 Los Alamos National Security.
##
## Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
## the U.S. Government retains certain rights in this software.
##
## Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
## Laboratory (LANL), the U.S. Government retains certain rights in
## this software.
##============================================================================
set(headers
FilterBanks.h
WaveletFilter.h
WaveletBase.h
)
#-----------------------------------------------------------------------------
vtkm_declare_headers(${headers})

@ -1,63 +0,0 @@
//=============================================================================
//
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt 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.
//
// Copyright 2015 Sandia Corporation.
// Copyright 2015 UT-Battelle, LLC.
// Copyright 2015 Los Alamos National Security.
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//
//=============================================================================
#ifndef vtk_m_worklet_wavelet_filterbanks_h
#define vtk_m_worklet_wavelet_filterbanks_h
#include <vtkm/Types.h>
namespace vtkm {
namespace worklet {
namespace wavelet {
const vtkm::Float64 hm4_44[9] = {
0.037828455507264,
-0.023849465019557,
-0.110624404418437,
0.377402855612831,
0.852698679008894,
0.377402855612831,
-0.110624404418437,
-0.023849465019557,
0.037828455507264
};
const vtkm::Float64 h4[9] = {
0.0,
-0.064538882628697,
-0.040689417609164,
0.418092273221617,
0.788485616405583,
0.418092273221617,
-0.0406894176091641,
-0.0645388826286971,
0.0
};
};
}
}
#endif

@ -1,175 +0,0 @@
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt 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.
//
// Copyright 2014 Sandia Corporation.
// Copyright 2014 UT-Battelle, LLC.
// Copyright 2014 Los Alamos National Security.
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
#ifndef vtk_m_worklet_wavelet_waveletbase_h
#define vtk_m_worklet_wavelet_waveletbase_h
#include <vtkm/worklet/WorkletMapField.h>
#include <vtkm/worklet/wavelet/WaveletFilter.h>
#include <vtkm/Math.h>
namespace vtkm {
namespace worklet {
namespace wavelet {
// protected:
enum DWTMode { // boundary extension modes
INVALID = -1,
ZPD,
SYMH,
SYMW,
ASYMH, ASYMW, SP0, SP1, PPD, PER
};
// Functionalities are similar to MatWaveBase in VAPoR.
class WaveletBase
{
public:
// Constructor
WaveletBase( const std::string &w_name )
{
this->filter = NULL;
this->wmode = PER;
this->wname = w_name;
if( wname.compare("CDF9/7") == 0 )
{
this->wmode = SYMW; // Default extension mode, see MatWaveBase.cpp
this->filter = new vtkm::worklet::wavelet::WaveletFilter( wname );
}
}
// Destructor
virtual ~WaveletBase()
{
if( filter )
delete filter;
filter = NULL;
}
// Get the wavelet filter
const WaveletFilter* GetWaveletFilter()
{
if( this->filter == NULL )
{
// throw an error
}
return filter;
}
// Returns length of approximation coefficients from a decompostition pass.
vtkm::Id GetApproxLength( vtkm::Id sigInLen )
{
vtkm::Id filterLen = this->filter->GetFilterLength();
if (this->wmode == PER)
return static_cast<vtkm::Id>(vtkm::Ceil( (static_cast<vtkm::Float64>(sigInLen)) / 2.0 ));
else if (this->filter->isSymmetric())
{
if ( (this->wmode == SYMW && (filterLen % 2 != 0)) ||
(this->wmode == SYMH && (filterLen % 2 == 0)) )
{
if (sigInLen % 2 != 0)
return((sigInLen+1) / 2);
else
return((sigInLen) / 2);
}
}
return static_cast<vtkm::Id>( vtkm::Floor(
static_cast<vtkm::Float64>(sigInLen + filterLen - 1) / 2.0 ) );
}
// Returns length of detail coefficients from a decompostition pass
vtkm::Id GetDetailLength( vtkm::Id sigInLen )
{
vtkm::Id filterLen = this->filter->GetFilterLength();
if (this->wmode == PER)
return static_cast<vtkm::Id>(vtkm::Ceil( (static_cast<vtkm::Float64>(sigInLen)) / 2.0 ));
else if (this->filter->isSymmetric())
{
if ( (this->wmode == SYMW && (filterLen % 2 != 0)) ||
(this->wmode == SYMH && (filterLen % 2 == 0)) )
{
if (sigInLen % 2 != 0)
return((sigInLen-1) / 2);
else
return((sigInLen) / 2);
}
}
return static_cast<vtkm::Id>( vtkm::Floor(
static_cast<vtkm::Float64>(sigInLen + filterLen - 1) / 2.0 ) );
}
// Returns length of coefficients generated in a decompostition pass
vtkm::Id GetCoeffLength( vtkm::Id sigInLen )
{
return( GetApproxLength( sigInLen ) + GetDetailLength( sigInLen ) );
}
vtkm::Id GetCoeffLength2( vtkm::Id sigInX, vtkm::Id sigInY )
{
return( GetCoeffLength( sigInX) * GetCoeffLength( sigInY ) );
}
vtkm::Id GetCoeffLength3( vtkm::Id sigInX, vtkm::Id sigInY, vtkm::Id sigInZ)
{
return( GetCoeffLength( sigInX) * GetCoeffLength( sigInY ) * GetCoeffLength( sigInZ ) );
}
// Returns maximum wavelet decompostion level
vtkm::Id GetWaveletMaxLevel( vtkm::Id sigInLen )
{
if( ! this->filter )
return 0;
else {
vtkm::Id filterLen = this->filter->GetFilterLength();
vtkm::Id level;
this->WaveLengthValidate( sigInLen, filterLen, level );
return level;
}
}
protected:
DWTMode wmode;
WaveletFilter* filter;
std::string wname;
void WaveLengthValidate( vtkm::Id sigInLen, vtkm::Id filterLength, vtkm::Id &level)
{
// *lev = (int) (log((double) sigInLen / (double) (waveLength)) / log(2.0)) + 1;
if( sigInLen < filterLength )
level = 0;
else
level = static_cast<vtkm::Id>( vtkm::Floor(
vtkm::Log2( static_cast<vtkm::Float64>(sigInLen) /
static_cast<vtkm::Float64>(filterLength) ) + 1.0 ) );
}
}; // Finish class WaveletBase.
} // Finish namespace wavelet
} // Finish namespace worlet
} // Finish namespace vtkm
#endif

@ -1,169 +0,0 @@
//============================================================================
// Copyright (c) Kitware, Inc.
// All rights reserved.
// See LICENSE.txt 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.
//
// Copyright 2014 Sandia Corporation.
// Copyright 2014 UT-Battelle, LLC.
// Copyright 2014 Los Alamos National Security.
//
// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
// the U.S. Government retains certain rights in this software.
//
// Under the terms of Contract DE-AC52-06NA25396 with Los Alamos National
// Laboratory (LANL), the U.S. Government retains certain rights in
// this software.
//============================================================================
#ifndef vtk_m_worklet_wavelet_waveletfilter_h
#define vtk_m_worklet_wavelet_waveletfilter_h
#include <vtkm/worklet/WorkletMapField.h>
#include <vtkm/worklet/wavelet/FilterBanks.h>
#include <vtkm/Math.h>
namespace vtkm {
namespace worklet {
namespace wavelet {
// Wavelet filter class;
// functionally equivalent to WaveFiltBase and its subclasses in VAPoR.
class WaveletFilter
{
public:
// constructor
WaveletFilter( const std::string &wname )
{
lowDecomposeFilter = highDecomposeFilter =
lowReconstructFilter = highReconstructFilter = NULL;
this->filterLength = 0;
if( wname.compare("CDF9/7") == 0 )
{
this->symmetricity= true;
this->filterLength = 9;
AllocateFilterMemory();
wrev( vtkm::worklet::wavelet::hm4_44, lowDecomposeFilter, filterLength );
qmf_wrev( vtkm::worklet::wavelet::h4, highDecomposeFilter, filterLength );
verbatim_copy( vtkm::worklet::wavelet::h4, lowReconstructFilter, filterLength );
qmf_even( vtkm::worklet::wavelet::hm4_44, highReconstructFilter, filterLength );
}
else
{
// throw an error here
}
}
// destructor
virtual ~WaveletFilter()
{
if( lowDecomposeFilter ) delete[] lowDecomposeFilter;
if( highDecomposeFilter ) delete[] highDecomposeFilter;
if( lowReconstructFilter ) delete[] lowReconstructFilter;
if( highReconstructFilter ) delete[] highReconstructFilter;
}
vtkm::Id GetFilterLength() { return this->filterLength; }
bool isSymmetric() { return this->symmetricity; }
const vtkm::Float64* GetLowDecomposeFilter() const
{
return lowDecomposeFilter;
}
const vtkm::Float64* GetHighDecomposeFilter() const
{
return highDecomposeFilter;
}
const vtkm::Float64* GetLowReconstructFilter() const
{
return lowReconstructFilter;
}
const vtkm::Float64* GetHighReconstructFilter() const
{
return highReconstructFilter;
}
protected:
bool symmetricity;
vtkm::Id filterLength;
vtkm::Float64* lowDecomposeFilter;
vtkm::Float64* highDecomposeFilter;
vtkm::Float64* lowReconstructFilter;
vtkm::Float64* highReconstructFilter;
void AllocateFilterMemory()
{
lowDecomposeFilter = new vtkm::Float64[ this->filterLength ];
highDecomposeFilter = new vtkm::Float64[ this->filterLength ];
lowReconstructFilter = new vtkm::Float64[ this->filterLength ];
highReconstructFilter = new vtkm::Float64[ this->filterLength ];
}
// Flipping operation; helper function to initialize a filter.
void wrev( const vtkm::Float64* sigIn, vtkm::Float64* sigOut, vtkm::Id sigLength )
{
for( vtkm::Id count = 0; count < sigLength; count++)
sigOut[count] = sigIn[sigLength - count - 1];
}
// Quadrature mirror filtering operation: helper function to initialize a filter.
void qmf_even ( const vtkm::Float64* sigIn, vtkm::Float64* sigOut, vtkm::Id sigLength )
{
for (vtkm::Id count = 0; count < sigLength; count++)
{
sigOut[count] = sigIn[sigLength - count - 1];
if (sigLength % 2 == 0) {
if (count % 2 != 0)
sigOut[count] = -1.0 * sigOut[count];
}
else {
if (count % 2 == 0)
sigOut[count] = -1.0 * sigOut[count];
}
}
}
// Flipping and QMF at the same time: helper function to initialize a filter.
void qmf_wrev ( const vtkm::Float64* sigIn, vtkm::Float64* sigOut, vtkm::Id sigLength )
{
for (vtkm::Id count = 0; count < sigLength; count++) {
sigOut[count] = sigIn[sigLength - count - 1];
if (sigLength % 2 == 0) {
if (count % 2 != 0)
sigOut[count] = -1 * sigOut[count];
}
else {
if (count % 2 == 0)
sigOut[count] = -1 * sigOut[count];
}
}
vtkm::Float64 tmp;
for (vtkm::Id count = 0; count < sigLength/2; count++) {
tmp = sigOut[count];
sigOut[count] = sigOut[sigLength - count - 1];
sigOut[sigLength - count - 1] = tmp;
}
}
// Verbatim Copying: helper function to initialize a filter.
void verbatim_copy ( const vtkm::Float64* sigIn, vtkm::Float64* sigOut, vtkm::Id sigLength )
{
for (vtkm::Id count = 0; count < sigLength; count++)
sigOut[count] = sigIn[count];
}
}; // Finish class WaveletFilter.
} // Finish namespace wavelet.
} // Finish namespace worlet
} // Finish namespace vtkm
#endif