X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FInterface%2FPolyLineParametricPath.cxx;h=37be8af02bd7d8639c6066fa142cbbed7f0cda87;hb=05b92946cf3e01d93bdf5f317df943baaac9ebda;hp=23fa0c7a6a44e4f1d0d28fddb7bd0dcdce1aa555;hpb=4c4b03aa87446a1aa78563fb75cc6d1956d7d64e;p=cpPlugins.git diff --git a/lib/cpPlugins/Interface/PolyLineParametricPath.cxx b/lib/cpPlugins/Interface/PolyLineParametricPath.cxx index 23fa0c7..37be8af 100644 --- a/lib/cpPlugins/Interface/PolyLineParametricPath.cxx +++ b/lib/cpPlugins/Interface/PolyLineParametricPath.cxx @@ -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 );