[opengtl-commits] [221] just for the sake of feeling the full power of success, lets commit that change that proves that the image data was modified by a shiva program !

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 221
Author:   cyrille
Date:     2008-06-22 23:57:53 +0200 (Sun, 22 Jun 2008)

Log Message:
-----------
just for the sake of feeling the full power of success, lets commit that change that proves that the image data was modified by a shiva program !

Modified Paths:
--------------
    trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva
    trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp


Modified: trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva
===================================================================
--- trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva	2008-06-22 21:42:18 UTC (rev 220)
+++ trunk/OpenGTL/OpenShiva/tests/imagegenerators/PlainGenerator.shiva	2008-06-22 21:57:53 UTC (rev 221)
@@ -2,6 +2,7 @@
 {
   void evaluatePixel(out pixel result)
   {
+    result[0] = 0.5;
 //    for(int i = 0; i < result.size; ++i )
     {
 //      result[i] = 0.5;

Modified: trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp
===================================================================
--- trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp	2008-06-22 21:42:18 UTC (rev 220)
+++ trunk/OpenGTL/OpenShiva/tools/interpreter/Shiva.cpp	2008-06-22 21:57:53 UTC (rev 221)
@@ -114,9 +114,9 @@
       return EXIT_FAILURE;
     }
     OpenShiva::Image image(200,300, pixel );
-    memset( image.data(0, 0), 0, 200 * 300 );
+    memset( image.data(0, 0), 1, 200 * 300 );
     p.evaluatePixeles( std::list<OpenShiva::AbstractImage*>(), &image );
-    std::cout << (int)*image.data( 0, 0);
+    std::cout << *((float*)image.data( 0, 0));
   }
   return EXIT_SUCCESS;
 }


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/