]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/PolyLineParametricPath.cxx
Some syntax simplifations
[cpPlugins.git] / lib / cpPlugins / Interface / PolyLineParametricPath.cxx
index 23fa0c7a6a44e4f1d0d28fddb7bd0dcdce1aa555..37be8af02bd7d8639c6066fa142cbbed7f0cda87 100644 (file)
@@ -81,13 +81,13 @@ _VTK( itk::DataObject* ref_image )
       image->TransformContinuousIndexToPhysicalPoint( idx, pnt );
       x = double( pnt[ 0 ] );
       y = double( pnt[ 1 ] );
-      z = ( D == 3 )? double( pnt[ 2 ] ): double( 0 );
+      z = ( D >= 3 )? double( pnt[ 2 ] ): double( 0 );
     }
     else
     {
       x = double( idx[ 0 ] );
       y = double( idx[ 1 ] );
-      z = ( D == 3 )? double( idx[ 2 ] ): double( 0 );
+      z = ( D >= 3 )? double( idx[ 2 ] ): double( 0 );
 
     } // fi
     points->InsertNextPoint( x, y, z );