marAxisCT.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   wxMaracas
00004   Module:    $RCSfile: marAxisCT.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009/05/14 13:55:07 $
00007   Version:   $Revision: 1.1 $
00008 
00009   Copyright: (c) 2002, 2003
00010   License:
00011   
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notice for more information.
00015 
00016 =========================================================================*/
00017 
00018 #ifndef __MAR__KERNEL__AXISCT__HXX__
00019 #define __MAR__KERNEL__AXISCT__HXX__
00020 
00021 
00022 
00023 #include <marAxis.h>
00024 #include <marAxisContours.h>
00025 #include <marPoint.h>
00026 #include <marIsocontour.h>
00027 #include <vector>
00028 #include <list>
00029 
00030 class MAR_KERNEL_EXPORT marAxisCT : public marAxis
00031 {
00032 
00033 public:
00034 
00035                 
00036         marAxisCT(  );
00037         marContour*             getContour( int point , kVolume* vol, int index );              // DATA-MODEL-2D  
00038         vtkPoints*              get3Dcontour(   int point , kVolume* vol, int index );          // VISUALISATION-VTK 3D
00039         vtkPolyData*    get2Dcontour(   int point , kVolume* vol, int index );          // VISUALISATION-VTK 2D
00040         vtkPoints*              get2DDiameterMin(       int point , kVolume* vol, int index );          // VISUALISATION-VTK 3D
00041         vtkPoints*              get2DDiameterMax(       int point , kVolume* vol, int index );          // VISUALISATION-VTK 3D
00042         int                             getSignal(int point, int index, kVolume* vol);
00043         void                    updateLumenPercentage(int point, kVolume* vol);
00044         void                    updateCalcPercentage(int point, kVolume* vol);
00045 
00046         void                    replaceContour2D(int point,int size,double *vx,double *vy, int type);
00047 
00048         marContourVO*   searchContour(int type, int point);
00049         int                     getNumberOfContours(int point, kVolume* vol);
00050         int                     getContourType(int point, int index, kVolume* vol  );
00051         void            createEmptyContours();
00052         void            eraseContours();
00053         void            eraseContoursPartial(int start);
00054         
00055         void                    histogram(int point, kVolume* vol);
00056         void            setCalibration(bool calib);
00057         bool            getCalibration();
00058         
00059         int                     getStartIndex();
00060         void            setStartIndex(int start);
00061 
00062         int                     getPointSize();
00063         marPoint*       getPoint(int i);
00064         void            markUpLumen(int point, kVolume* vol);
00065         void            generateFile(int point,kVolume* vol);
00066 
00067         void            cleanContours(int type, int point);
00068         double          performXOR(int type, int point, std::vector<marIsocontour *> manual, kVolume* vol);
00069         double          performAND(int type, int point, std::vector<marIsocontour *> manual, kVolume* vol);
00070         double          performUnion(int type, int point, std::vector<marIsocontour *> manual, kVolume* vol);
00071         marIsocontour*  loadMarIsocontour(int size, double *vx, double *vy);
00072 
00073 
00074 private:
00075 
00076         void                    createContours(         int point       , kVolume* vol );
00077         void                    create3Dcontours(       int point       , kVolume* vol );
00078         void                    create2Dcontours(       int point       , kVolume* vol );
00079         void                    create2DDiametersMin(int point  , kVolume* vol );
00080         void                    create2DDiametersMax(int point  , kVolume* vol );
00081         void                    createSignals (int point, kVolume* vol);
00082         void                    generatePoints(int point, kVolume* vol, std::vector<marIsocontour*> *list);
00083         int                             getMaximumGrad(std::vector <marPoint *> list, int iniPos, int limit, double threshold);
00084         int                             getMinimumGrad(std::vector <marPoint *> list, int iniPos, int limit, double threshold);
00085         double                  interpolate(double x, double y, vtkImageData* imagedata);
00086         void                    generateVector(int dir,int *coordBase,double originX,double originY,double *x,double *y);
00087         bool                    detectNeighbor(marIsocontour* contour,int dir, int type);
00088         marIsocontour*  addPointToContour(marIsocontour* cont ,bool inside,int type,marPoint* point);
00089         void                    unifyDividedStructure(std::vector<marIsocontour*> *contList);
00090         double                  getStatistics(marIsocontour* contour, double x, double y, vtkImageData* imagedata);
00091         double                  getCalcStatistics(marIsocontour* contour, double x, double y, vtkImageData* imagedata,int i);
00092         int                             round(double num);
00093         int                             getMaxIntensity(int point);
00094         bool                    pointInPolygon(marIsocontour *c, double x, double y);
00095         marIsocontour*  parsePolyDataToMarIsocontour(marContourVO* contourVO);
00096 
00097         marIsocontour*  filterContour(marIsocontour* contExt, marIsocontour* contInt, double radio);
00098         
00099         double                  obtainContourArea(marIsocontour*contour);
00100         void                    adjustWall(int point, kVolume* vol);
00101         void                    adjustCalcification(int point, kVolume* vol);
00102         void                    adjustContour(int point, kVolume* vol);
00103         int                             maxValue(std::vector <double> list);
00104         int                             getDiameter(marContourVO* contourVO, double x, double y, int limInfX, int limInfY, int limSupX, int limSupY);
00105         
00106         int                             searchData(std::vector<double> vec, double value);
00107 
00108         void                    extractLumen(vtkImageData *lumenImage, marIsocontour *lumenContour, int point);
00109         double                  avgValue;
00110         double                  stdValue;
00111         int                             startIndex;
00112         double                  maxSignal;
00113 
00114         
00115         
00116                                 //      Contours per slice
00117 
00118         //Eliminados
00119         //      marIsocontour*  shrinkContour(marIsocontour *cont, double thresh, vtkImageData* imageData, double radio);
00120   
00121 };
00122 
00123 #endif // __MAR__KERNEL__AXISCT__HXX__

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1