ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkNormalVariateGenerator.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkNormalVariateGenerator_h
00019 #define __itkNormalVariateGenerator_h
00020 
00021 #include "itkObjectFactory.h"
00022 #include "itkRandomVariateGeneratorBase.h"
00023 
00024 namespace itk
00025 {
00026 namespace Statistics
00027 {
00097 class ITK_EXPORT NormalVariateGenerator:
00098   public RandomVariateGeneratorBase
00099 {
00100 public:
00102   typedef NormalVariateGenerator     Self;
00103   typedef RandomVariateGeneratorBase Superclass;
00104   typedef SmartPointer< Self >       Pointer;
00105   typedef SmartPointer< const Self > ConstPointer;
00106 
00108   itkTypeMacro(NormalVariateGenerator,
00109                RandomVariateGeneratorBase);
00110 
00112   itkNewMacro(Self);
00113 
00115   void Initialize(int randomSeed);
00116 
00118   double GetVariate();
00119 
00120 protected:
00121   NormalVariateGenerator();
00122   virtual ~NormalVariateGenerator();
00123   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00124 
00126   double FastNorm(void);
00127 
00128 private:
00129   double m_Scale;
00130   double m_Rscale;
00131   double m_Rcons;
00132   int    m_ELEN;
00133   int    m_LEN;
00134   int    m_LMASK;
00135   int    m_TLEN;
00136 
00137   int  m_Gaussfaze;
00138   int *m_Gausssave;
00139 
00140   double m_GScale;
00141 
00142   int *  m_Vec1;
00143   int    m_Nslew;
00144   int    m_Irs;
00145   int    m_Lseed;
00146   double m_Chic1;
00147   double m_Chic2;
00148   double m_ActualRSD;
00149 };  // end of class
00150 } // end of namespace Statistics
00151 } // end of namespace itk
00152 #endif
00153