]> Creatis software - creaContours.git/blobdiff - bbtk/src/bbcreaContoursSetViewerPosition.cxx
#3322 creaContours Feature New Normal - Show reference contour Befor After actual...
[creaContours.git] / bbtk / src / bbcreaContoursSetViewerPosition.cxx
index 67c824e97ed35ed887514f7a6dd10a804e3dbd30..365c4a0973eda1ea94297c6cde112cb2b55e55c4 100644 (file)
@@ -42,8 +42,24 @@ void SetViewerPosition::Process()
                        img->GetExtent(ext);
                        int dimY=ext[3]-ext[2]+1;
 
-                       bbGetInputwxContourMainFrame()->setConceptValue( "Axe Depth", y );
-                       bbGetInputwxContourMainFrame()->SetXY(x,dimY-z-1);
+                       if (bbGetInputDirection()==0)
+                       {
+                               bbGetInputwxContourMainFrame()->setConceptValue( "Axe Depth", z );
+                               bbGetInputwxContourMainFrame()->SetXY(x,y);
+                       } // if Direction1
+
+                       if (bbGetInputDirection()==1)
+                       {
+                               bbGetInputwxContourMainFrame()->setConceptValue( "Axe Depth", y );
+                               bbGetInputwxContourMainFrame()->SetXY(x,dimY-z-1);
+                       } // if Direction1
+
+                       if (bbGetInputDirection()==2)
+                       {
+                               bbGetInputwxContourMainFrame()->setConceptValue( "Axe Depth", x );
+                               bbGetInputwxContourMainFrame()->SetXY(dimY-z-1,y);
+                       } // if Direction1
+
 
                        bbGetInputwxContourMainFrame()->showAxis(true);
                        bbGetInputwxContourMainFrame()->changeInstant();
@@ -60,6 +76,7 @@ void SetViewerPosition::bbUserSetDefaultValues()
 
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
+   bbSetInputDirection(0);
    bbSetInputwxContourMainFrame(NULL);
   
 }