00001
00002 """
00003 Contains the N-D contourlet transform.
00004 """
00005
00006 __copyright__ = """
00007 Copyright 2008 Sean Ross-Ross
00008 """
00009 __license__ = """
00010 This file is part of SLIMpy .
00011
00012 SLIMpy is free software: you can redistribute it and/or modify
00013 it under the terms of the GNU Lesser General Public License as published by
00014 the Free Software Foundation, either version 3 of the License, or
00015 (at your option) any later version.
00016
00017 SLIMpy is distributed in the hope that it will be useful,
00018 but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 GNU Lesser General Public License for more details.
00021
00022 You should have received a copy of the GNU Lesser General Public License
00023 along with SLIMpy . If not, see <http://www.gnu.org/licenses/>.
00024 """
00025
00026 from slimpy_base.Core.User.linop.rclinOp import linearop_r as __LR
00027
00028 _surf__LR = __LR
00029
00030
00031
00032 class surf(__LR):
00033 """
00034 The N-D Contourlet Transformation--Surfacelet.
00035 """
00036 name = 'surf'
00037 def __init__(self,inSpace,adj=False,Pyr_Level=2,**kparams):
00038 """
00039 Only Pyr_Level, K, lambda, beta, mSize, bo, dir_filter allowed.
00040 Constructor
00041 @param inSpace space instance
00042 @param adj create adjoint transform
00043 @param Pyr_Level ???
00044 """
00045 for key in kparams:
00046 if not key in ['Pyr_Level','K','lamb','beta','mSize','bo','dir_filter']:
00047 raise TypeError,"Invalid Paramter, only Pyr_Level, K, lamb, beta, mSize, bo, dir_filter allowed."
00048
00049 kparams.update( adj=adj, Pyr_Level=Pyr_Level )
00050
00051 __LR.__init__(self,inSpace,**kparams)
00052
00053 def inv(self):
00054 """
00055 Apply the INVERSE version of the sfsurf
00056 """
00057 t = self.copy()
00058 t.kparams['inv'] = 'y'
00059 return t.adj()
00060