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();
}
//------------------------------------------------------------------------------------------------------------
// 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;
- OutlineModelManager* getOutlineModelManager();
+ OutlineModelManager *getOutlineModelManager();
};
#endif