Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkRecursiveSphereDirectionEncoder.h

00001 /*=========================================================================
00002 
00003   Program:   3DMed
00004   Date:      $Date: 2014-02-25 18:30:00 +0800 $
00005   Version:   $Version: 4.6.0 $
00006   Copyright: MIPG, Institute of Automation, Chinese Academy of Sciences
00007 
00008 =========================================================================*/
00009 
00010 
00011 #ifndef __mitkRecursiveSphereDirectionEncoder_
00012 #define __mitkRecursiveSphereDirectionEncoder_
00013 
00014 #include "mitkDirectionEncoder.h"
00015 
00023 class MITK_VISUALIZATION_API mitkRecursiveSphereDirectionEncoder : public mitkDirectionEncoder
00024 {
00025 public: 
00026     MITK_TYPE(mitkRecursiveSphereDirectionEncoder,mitkDirectionEncoder)
00027     
00028     mitkRecursiveSphereDirectionEncoder();    
00029 
00035     int GetEncodedDirection( float n[3] );
00036     
00042     float *GetDecodedGradient( int value );
00043     
00048     int GetNumberOfEncodedDirections();
00049     
00057     float *GetDecodedGradientTable();
00058 
00074     virtual void SetRecursionDepth(int fnDepth);
00075 
00080     virtual int GetRecursionDepthMinValue(){return 0;};
00081 
00086     virtual int GetRecursionDepthMaxValue(){return 6;};
00087 
00103     virtual int GetRecursionDepth(){return this->m_RecursionDepth;};
00104 
00105 protected:
00106     //Attributes:
00107     int                     m_RecursionDepth;
00108     
00109     // The index table which maps (x,y) position in the rotated grid
00110     // to an encoded normal 
00111     //int                   IndexTable[2*NORM_SQR_SIZE - 1][2*NORM_SQR_SIZE -1];
00112     int                     *m_IndexTable;
00113     
00114     // This is a table that maps encoded normal (2 byte value) to a 
00115     // normal (dx, dy, dz)
00116     //float                 DecodedNormal[3*(1 + 2*(NORM_SQR_SIZE*NORM_SQR_SIZE+
00117     //                             (NORM_SQR_SIZE-1)*(NORM_SQR_SIZE-1)))];
00118     float                   *m_DecodedNormal;
00119     
00120     // Method to initialize the index table and variable that
00121     // stored the recursion depth the last time the table was
00122     // built
00123     int                   m_IndexTableRecursionDepth;
00124     
00125     int                   m_OuterSize;
00126     int                   m_InnerSize;
00127     int                   m_GridSize;
00128 
00129     virtual ~mitkRecursiveSphereDirectionEncoder();
00130     //operations:
00131     void                  _initializeIndexTable();
00132 
00133 private:
00134     mitkRecursiveSphereDirectionEncoder(const mitkRecursiveSphereDirectionEncoder&);
00135     void operator=(const mitkRecursiveSphereDirectionEncoder&);
00136   
00137 };
00138 
00139 
00140 
00141 //#define DEFINED_mitkRecursiveSphereDirectionEncoder
00142  
00143 
00144 
00145 #endif
00146 
00147 /*=========================================================================
00148 
00149   Program:   Visualization Toolkit
00150   Module:    $RCSfile$
00151   Language:  C++
00152   Date:      $Date: 2006-07-31 22:19:26 +0800 (ÐÇÆÚÒ», 31 ÆßÔÂ 2006) $
00153   Version:   $Revision: 34 $
00154 
00155 
00156 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00157 All rights reserved.
00158 
00159 Redistribution and use in source and binary forms, with or without
00160 modification, are permitted provided that the following conditions are met:
00161 
00162  * Redistributions of source code must retain the above copyright notice,
00163    this list of conditions and the following disclaimer.
00164 
00165  * Redistributions in binary form must reproduce the above copyright notice,
00166    this list of conditions and the following disclaimer in the documentation
00167    and/or other materials provided with the distribution.
00168 
00169  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00170    of any contributors may be used to endorse or promote products derived
00171    from this software without specific prior written permission.
00172 
00173  * Modified source versions must be plainly marked as such, and must not be
00174    misrepresented as being the original software.
00175 
00176 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00177 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00178 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00179 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00180 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00181 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00182 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00183 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00184 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00185 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00186 
00187 =========================================================================*/ 
00188 

Generated on Tue Feb 25 15:00:37 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3