+
+void KernelManagerContour::changeImage(int id, vtkImageData *img)
+{
+ if ( id<vectimages.size() )
+ {
+ vectimages[id]=img;
+ }
+ double spc[3];
+ std::vector<double> vectspc;
+ img->GetSpacing(spc);
+ vectspc.push_back(spc[0]);
+ vectspc.push_back(spc[1]);
+ vectspc.push_back(spc[2]);
+ vectimagesSpacing[id]=vectspc;
+ std::string imgstring = "Source Image "+intToString(id+1);
+ ImageSourceThing *imagesourcething = modelManager->getImageSourceThingByKeyName( imgstring );
+ imagesourcething->setSourceImage( img );
+}
+
+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();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ change->SetInformationInput(img);
+ change->SetInputConnection(img->GetProducerPort());
+#else
+ change->SetInputData(img);
+#endif
+ img->GetSpacing(spc);
+// change->SetOutputSpacing(1,1,1);
+//EED 18 fev 2014
+ change->SetOutputOrigin (0, 0, 0);
+ 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();
+ } // for i