]> Creatis software - creaVtk.git/commitdiff
#2660 creaVtk Feature New Normal - New cutImageSegmentation
authorespinosa <Monica.Espinosa@creatis.insa-lyon.fr>
Mon, 22 Jun 2015 14:30:09 +0000 (16:30 +0200)
committerespinosa <Monica.Espinosa@creatis.insa-lyon.fr>
Mon, 22 Jun 2015 14:30:09 +0000 (16:30 +0200)
lib/creaVtk/cutImageSegmentation.cpp

index 4fa20cadcad798fe0f8dcdc5230c63e70a96e874..45c2e3d55e4a261d55ac5f78fdcf5d666b48c84f 100644 (file)
@@ -160,16 +160,28 @@ void cutImageSegmentation::Process()
 
 
                double origin[3];
-               double *spacing = NULL;
-               spacing = m_Image->GetSpacing();
+               //double *spacing = NULL;
+               //spacing = m_Image->GetSpacing();
+
+               double spacing[3];
+               spacing[0] = 2.62565;
+               spacing[1] = 2.62565;
+               spacing[2] = 6.25;
 
                std::cout << "spacing 0:" << spacing[0]<< std::endl;
                std::cout << "spacing 1:" << spacing[1]<< std::endl;
                std::cout << "spacing 2:" << spacing[2]<< std::endl;
 
-               origin[0] = 63;//bounds[0];
-               origin[1] = 44;//bounds[2];
-               origin[2] = 4;//bounds[4];
+               //origin[0] = bounds[0] + spacing[0] / 2;
+               //origin[1] = bounds[2] + spacing[1] / 2;
+               //origin[2] = bounds[4] + spacing[2] / 2;
+
+
+               //MLER -- EED ??????????????????? 64,52,5
+               origin[0] = 64;
+               origin[1] = 52;
+               origin[2] = 5;
 
                std::cout << "origin;0:" << origin[0]<< std::endl;
                std::cout << "origin 1:" << origin[1]<< std::endl;
@@ -195,7 +207,7 @@ void cutImageSegmentation::Process()
                imageStencil->SetInput(m_Image);
                imageStencil->SetStencil(dataToStencil->GetOutput());
                imageStencil->ReverseStencilOff();
-               imageStencil->SetBackgroundValue(0);
+               imageStencil->SetBackgroundValue(-200);
                imageStencil->Update();
 
                m_ResultImage = imageStencil->GetOutput();