diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3db7a99 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/* +*.user diff --git a/basevh.cpp b/basevh.cpp index e8f5c69..c9e3b98 100644 --- a/basevh.cpp +++ b/basevh.cpp @@ -854,7 +854,9 @@ void BaseVH::displayContour3D( std::vector< std::vector< cv::Point2f > > contour edgePolyData->InsertNextCell( VTK_LINE , cell ); - const unsigned char _color[] = { colorVecs[ ee1 ][ ee2 ][ 0 ] , colorVecs[ ee1 ][ ee2 ][ 1 ] , colorVecs[ ee1 ][ ee2 ][ 2 ]}; + const unsigned char _color[] = { (unsigned char) colorVecs[ ee1 ][ ee2 ][ 0 ] , + (unsigned char) colorVecs[ ee1 ][ ee2 ][ 1 ] , + (unsigned char) colorVecs[ ee1 ][ ee2 ][ 2 ]}; colors->InsertNextTupleValue(_color); } diff --git a/display3droutines.cpp b/display3droutines.cpp index 8aec61e..5ee1301 100644 --- a/display3droutines.cpp +++ b/display3droutines.cpp @@ -187,7 +187,11 @@ void Display3DRoutines::displayPointSet(std::vector< Eigen::Vector3d >& vertices for (int vv = 0; vv < numVerts; vv++) { - unsigned char col[] = { colors[vv](0) * 255, colors[vv](1) * 255, colors[vv](2) * 255 }; + unsigned char col[] = {(unsigned char) (colors[vv](0) * 255), + (unsigned char) (colors[vv](1) * 255), + (unsigned char) (colors[vv](2) * 255) }; + + vColors->InsertNextTupleValue(col); diff --git a/epvh.cpp b/epvh.cpp index facae1f..63e5078 100644 --- a/epvh.cpp +++ b/epvh.cpp @@ -2569,7 +2569,9 @@ namespace tr{ edgePolyData->InsertNextCell( VTK_LINE , cell ); - const unsigned char _color[] = { colorVecs[ ee1 ][ ee2 ][ 0 ] , colorVecs[ ee1 ][ ee2 ][ 1 ] , colorVecs[ ee1 ][ ee2 ][ 2 ]}; + const unsigned char _color[] = { (unsigned char)colorVecs[ ee1 ][ ee2 ][ 0 ] , + (unsigned char) colorVecs[ ee1 ][ ee2 ][ 1 ] , + (unsigned char) colorVecs[ ee1 ][ ee2 ][ 2 ]}; colors->InsertNextTupleValue(_color); }