From: Eduardo Davila Date: Fri, 27 May 2011 10:44:07 +0000 (+0000) Subject: no message X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=fb42dbcd2fdf92b96397f90ac6b2794026c6d5cc;p=creaContours.git no message --- diff --git a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx index 8efa5a9..236a515 100644 --- a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx +++ b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.cxx @@ -68,24 +68,35 @@ KernelManagerContour::KernelManagerContour(std::vector images,std initializeEnvironment(datadir); } -KernelManagerContour::~KernelManagerContour(){ + +KernelManagerContour::~KernelManagerContour() +{ } -std::vector KernelManagerContour::getVectImages(){ +std::vector KernelManagerContour::getVectImages() +{ return vectimages; } -void KernelManagerContour::setVectImages(std::vector vectimg){ - +void KernelManagerContour::setVectImages(std::vector vectimg) +{ + double spc[3]; + std::vector 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(); } diff --git a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h index 6aa151f..cb3eed5 100644 --- a/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h +++ b/lib/kernel_ManagerContour_NDimensions/KernelManagerContour.h @@ -152,24 +152,25 @@ private: //------------------------------------------------------------------------------------------------------------ // Attributes //------------------------------------------------------------------------------------------------------------ - std::vector vectimages; + std::vector vectimages; + std::vector > 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; - OutlineModelManager* getOutlineModelManager(); + OutlineModelManager *getOutlineModelManager(); }; #endif