]> Creatis software - creaContours.git/blobdiff - lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx
Clean code
[creaContours.git] / lib / kernel_ManagerContour_NDimensions / KernelManagerContour.cxx
index 8e9f1d8e3663b3c498ae5d7327eb2c4635c13e7d..5671ae0e6a204767b5a24c7e99d77f8819614f23 100644 (file)
@@ -98,8 +98,8 @@ void KernelManagerContour::setVectImages(std::vector<vtkImageData*> vectimg)
        std::vector<double> vectspc;
        for(int i = 0; i < (int)(vectimg.size()); i++)
        {
-               vtkImageData* img = vectimg[i];
-               vtkImageChangeInformationchange = vtkImageChangeInformation::New();
+               vtkImageData                *img    = vectimg[i];
+               vtkImageChangeInformation   *change = vtkImageChangeInformation::New();
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
                change->SetInformationInput(img);
@@ -131,23 +131,23 @@ void KernelManagerContour::GetSpacing(double *vecspc, int iImage)
 
 void KernelManagerContour::initializeEnvironment(std::string datadir)
 {
-       _datadir                                                    = datadir;
-       std::string conceptsFN                                              = datadir+"holaConceptsFile.cf";
-       std::string imageSourcesFN                                          = datadir+"holaImagesInstantsFile.of";
-       std::string imageSectionsFN                                         = "";
-       std::string axeThingsFN                                             = "";
-       std::map<std::string, ImageSourceThing *> * sourcesMap      = new std::map<std::string, ImageSourceThing *>();
-       std::map<std::string, ImageSectionThing *>* sectionsMap     = new std::map<std::string, ImageSectionThing *>();
-       std::map<std::string, AxeThing *>* axesMap                                  = new std::map<std::string, AxeThing *>();
-       std::map<std::string, ContourThing *>* outlinesMap                  = new std::map<std::string, ContourThing *>();
+                                                _datadir            = datadir;
+       std::string                                 conceptsFN                  = datadir+"holaConceptsFile.cf";
+       std::string                                 imageSourcesFN              = datadir+"holaImagesInstantsFile.of";
+       std::string                                 imageSectionsFN             = "";
+       std::string                                 axeThingsFN                 = "";
+       std::map<std::string, ImageSourceThing *>   *sourcesMap         = new std::map<std::string, ImageSourceThing *>();
+       std::map<std::string, ImageSectionThing *>  *sectionsMap            = new std::map<std::string, ImageSectionThing *>();
+       std::map<std::string, AxeThing *>           *axesMap                    = new std::map<std::string, AxeThing *>();
+       std::map<std::string, ContourThing *>       *outlinesMap                = new std::map<std::string, ContourThing *>();
        for(int i = 0; i < (int)(vectimages.size()); i++)
        {
-               vtkImageData* selectedimage = vectimages[i];
-               ImageSourceThing * thing                                                                = new ImageSourceThing(selectedimage);
-               std::string imgstring = "Source Image "+intToString(i+1);
+               vtkImageData        *selectedimage      = vectimages[i];
+               ImageSourceThing    *thing              = new ImageSourceThing(selectedimage);
+               std::string         imgstring           = "Source Image "+intToString(i+1);
                sourcesMap->insert(std::pair<std::string, ImageSourceThing *>( imgstring, thing));
        } // for
-       OutlineModelBuilder * _builder                                                          = new OutlineModelBuilder( conceptsFN ,datadir);
+       OutlineModelBuilder     *_builder = new OutlineModelBuilder( conceptsFN ,datadir);
        _builder->buildImageSource_Envornment( imageSourcesFN, sourcesMap );
        _builder->buildImageSection_Envornment( imageSectionsFN, sectionsMap );
        _builder->buildAxe_Envornment(axeThingsFN, axesMap );
@@ -490,25 +490,30 @@ void KernelManagerContour::getConceptsInformation(std::vector<std::string>& conc
 }
 
 
-vtkImageData* KernelManagerContour::getImageAtInstant(std::vector<int> inst){
+vtkImageData* KernelManagerContour::getImageAtInstant(std::vector<int> inst)
+{
        int index = inst[5]-1;
 
-       if(index < (int)(vectimages.size())&&index!=_currentIndex){
+       if(index < (int)(vectimages.size())&&index!=_currentIndex)
+    {
                _currentIndex=index;
                return vectimages[index];
        }
        return NULL;
 }
 
-std::string KernelManagerContour::getCurrentFileName(){
+std::string KernelManagerContour::getCurrentFileName()
+{
        return filename;
 }
 
-void KernelManagerContour::setCurrentFileName(std::string filenam){
+void KernelManagerContour::setCurrentFileName(std::string filenam)
+{
        this->filename = filenam;
 }
 
-std::string KernelManagerContour::parseOsirixFile(std::string filename){
+std::string KernelManagerContour::parseOsirixFile(std::string filename)
+{
 
 
 #ifdef ParserOsirix_BUILD