vtkMRMLEMSTreeParametersLeafNode.h

Go to the documentation of this file.
00001 #ifndef __vtkMRMLEMSTreeParametersLeafNode_h
00002 #define __vtkMRMLEMSTreeParametersLeafNode_h
00003 
00004 #include "vtkMRML.h"
00005 #include "vtkMRMLNode.h"
00006 #include "vtkEMSegment.h"
00007 #include "vtkMRMLScene.h"
00008 
00009 #include <vector>
00010 
00011 class VTK_EMSEGMENT_EXPORT vtkMRMLEMSTreeParametersLeafNode : 
00012   public vtkMRMLNode
00013 {
00014 public:
00015   static vtkMRMLEMSTreeParametersLeafNode *New();
00016   vtkTypeMacro(vtkMRMLEMSTreeParametersLeafNode,vtkMRMLNode);
00017   void PrintSelf(ostream& os, vtkIndent indent);
00018 
00019   virtual vtkMRMLNode* CreateNodeInstance();
00020 
00021   // Description:
00022   // Set node attributes
00023   virtual void ReadXMLAttributes(const char** atts);
00024 
00025   // Description:
00026   // Write this node's information to a MRML file in XML format.
00027   virtual void WriteXML(ostream& of, int indent);
00028 
00029   // Description:
00030   // Copy the node's attributes to this object
00031   virtual void Copy(vtkMRMLNode *node);
00032 
00033   // Description:
00034   // Get node XML tag name (like Volume, Model)
00035   virtual const char* GetNodeTagName() {return "EMSTreeParametersLeaf";}
00036 
00037 
00038   // manipulate target input channels
00039   vtkGetMacro(NumberOfTargetInputChannels, unsigned int);
00040   virtual void SetNumberOfTargetInputChannels(unsigned int n);
00041   virtual void AddTargetInputChannel();
00042   virtual void RemoveNthTargetInputChannel(int index);
00043   virtual void MoveNthTargetInputChannel(int fromIndex, int toIndex);
00044 
00045   vtkGetMacro(IntensityLabel, int);
00046   vtkSetMacro(IntensityLabel, int);
00047 
00048   vtkGetMacro(PrintQuality, int);
00049   vtkSetMacro(PrintQuality, int);
00050 
00051   virtual double GetLogMean(int index) const;
00052   virtual void SetLogMean(int index, double value);
00053 
00054   virtual double GetLogCovariance(int row, int column) const;
00055   virtual void SetLogCovariance(int row, int column, double value);
00056 
00057   virtual double GetLogMeanCorrection(int index) const;
00058   virtual void SetLogMeanCorrection(int index, double value);
00059 
00060   virtual double GetLogCovarianceCorrection(int row, int column) const;
00061   virtual void SetLogCovarianceCorrection(int row, int column, double value);
00062 
00063   //BTX
00064   // It makes a copy of it 
00065   vtkstd::vector<vtkstd::vector<double> >  GetLogCovarianceCorrection()
00066     {
00067       return this->LogCovarianceCorrection;
00068     }
00069 
00070   vtkstd::vector<vtkstd::vector<double> >  GetLogCovariance()
00071     {
00072       return this->LogCovariance;
00073     }
00074 
00075   enum
00076     {
00077     DistributionSpecificationManual = 0,
00078     DistributionSpecificationManuallySample,
00079     DistributionSpecificationAutoSample
00080     };
00081 
00082   //ETX
00083   vtkGetMacro(DistributionSpecificationMethod, int);
00084   vtkSetMacro(DistributionSpecificationMethod, int);
00085 
00086   // name of the parcellation volume in the atlas
00087   vtkGetStringMacro(SubParcellationVolumeName);
00088   vtkSetStringMacro(SubParcellationVolumeName);
00089 
00090   virtual int GetNumberOfSamplePoints() const;
00091   virtual void AddSamplePoint(double xyz[3]);
00092   virtual void RemoveNthSamplePoint(int n);
00093   virtual void ClearSamplePoints();
00094   virtual void GetNthSamplePoint(int n, double xyz[3]) const;
00095 
00096 protected:
00097   vtkMRMLEMSTreeParametersLeafNode();
00098   ~vtkMRMLEMSTreeParametersLeafNode();
00099   vtkMRMLEMSTreeParametersLeafNode(const vtkMRMLEMSTreeParametersLeafNode&);
00100   void operator=(const vtkMRMLEMSTreeParametersLeafNode&);
00101 
00102   int                                 PrintQuality;
00103   int                                 IntensityLabel;
00104   int                                 DistributionSpecificationMethod;
00105   char*                               SubParcellationVolumeName;
00106 
00107   //BTX
00108   typedef vtkstd::vector<double>                PointType;
00109   typedef vtkstd::vector<PointType>             SamplePointListType;
00110   typedef SamplePointListType::iterator         SamplePointListIterator;
00111   typedef SamplePointListType::const_iterator   SamplePointListConstIterator;
00112 
00113   SamplePointListType                           DistributionSamplePointsRAS;
00114   vtkstd::vector<double>                        LogMean;
00115   vtkstd::vector<vtkstd::vector<double> >       LogCovariance;
00116 
00117   // These values define the deviation from LogMean and LogCovariance 
00118   // that way one can automatically compute Intensity distribution from Template and then might slight changes 
00119   // the gui always shows the LogMean - LogMeanCorrection 
00120   vtkstd::vector<double>                        LogMeanCorrection;
00121   vtkstd::vector<vtkstd::vector<double> >       LogCovarianceCorrection;
00122   //ETX
00123 
00124   unsigned int                        NumberOfTargetInputChannels;
00125 };
00126 
00127 #endif

Generated on 6 Apr 2011 for Slicer3 by  doxygen 1.6.1