]> Creatis software - creaContours.git/commitdiff
no message
authorEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 27 May 2011 10:44:07 +0000 (10:44 +0000)
committerEduardo Davila <Eduardo.Davila@creatis.insa-lyon.fr>
Fri, 27 May 2011 10:44:07 +0000 (10:44 +0000)
lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx
lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h

index 8efa5a9eef6582f686059ca8d872b1b45a6d9e64..236a515ea6e34341c95379b9a716230e8e5e72d8 100644 (file)
@@ -68,24 +68,35 @@ KernelManagerContour::KernelManagerContour(std::vector<vtkImageData*> images,std
        initializeEnvironment(datadir);
 
 }
-KernelManagerContour::~KernelManagerContour(){
+
+KernelManagerContour::~KernelManagerContour()
+{
 }
 
-std::vector<vtkImageData*> KernelManagerContour::getVectImages(){
+std::vector<vtkImageData*> KernelManagerContour::getVectImages()
+{
        return vectimages;
 }
-void KernelManagerContour::setVectImages(std::vector<vtkImageData*> vectimg){
-
+void KernelManagerContour::setVectImages(std::vector<vtkImageData*> vectimg)
+{
+       double spc[3];
+       std::vector<double> vectspc;
+       
        for(int i = 0; i < (int)(vectimg.size()); i++){
                vtkImageData* img = vectimg[i];
                vtkImageChangeInformation* change = vtkImageChangeInformation::New();
                change->SetInformationInput(img);
                change->SetInputConnection(img->GetProducerPort());
 
+               img->GetSpacing(spc);
                change->SetOutputSpacing(1,1,1);
-
                change->Update();
 
+               vectspc.clear();
+               vectspc.push_back(spc[0]);
+               vectspc.push_back(spc[1]);
+               vectspc.push_back(spc[2]);
+               vectimagesSpacing.push_back(vectspc);
                vectimg[i] = change->GetOutput();
        }
 
index 6aa151f5db8b8e4e04f20d08296636870ab28c6b..cb3eed540fc3657e7e1099d064044f1256ad55d4 100644 (file)
@@ -152,24 +152,25 @@ private:
 //------------------------------------------------------------------------------------------------------------
 // Attributes
 //------------------------------------------------------------------------------------------------------------
-       std::vector<vtkImageData*> vectimages;
+       std::vector<vtkImageData*>                              vectimages;
+       std::vector<std::vector<double> >               vectimagesSpacing;
 
-       ImageSourceThing                imageSource;
+       ImageSourceThing                                                *imageSource;
 
        //Instant * _actualInstant;
 //Temporary attribute should be removed
-       OutlineModelManager             modelManager;
+       OutlineModelManager                                             *modelManager;
 
-       std::string filename;
+       std::string                                                             filename;
 
-       int inredo;
-       int inundo;
-       int _currentIndex;
-       std::string     stundoredo;
-       std::string _datadir;
+       int                                                                             inredo;
+       int                                                                             inundo;
+       int                                                                             _currentIndex;
+       std::string                                                             stundoredo;
+       std::string                                                             _datadir;
 
-       ContourPropagation_contourPropagation;
+       ContourPropagation                                              *_contourPropagation;
 
-       OutlineModelManagergetOutlineModelManager();
+       OutlineModelManager                                             *getOutlineModelManager();
 };
 #endif