public void setTrackDisplayMode( final int mode ) { this.displayMode = mode; if ( displayMode == TrackMateModelView.TRACK_DISPLAY_MODE_WHOLE ) { final Color4f color = new Color4f(); for ( final Integer trackID : lines.keySet() ) { final LineArray line = lines.get( trackID ); for ( int i = 0; i < line.getVertexCount(); i++ ) { line.getColor( i, color ); color.w = 1f; line.setColor( i, color ); } } } }
/** * Returns the color of the specified edge mesh. */ public Color getColor( final DefaultWeightedEdge edge ) { // First, find to what track it belongs to final int trackID = model.getTrackModel().trackIDOf( edge ); // Retrieve color from index final Color4f color = new Color4f(); final int index = edgeIndices.get( trackID ).get( edge ); final LineArray line = lines.get( trackID ); if ( null == line ) { return null; } line.getColor( index, color ); return color.get(); }
/** * Returns the color of the specified edge mesh. */ public Color getColor( final DefaultWeightedEdge edge ) { // First, find to what track it belongs to final int trackID = model.getTrackModel().trackIDOf( edge ); // Retrieve color from index final Color4f color = new Color4f(); final int index = edgeIndices.get( trackID ).get( edge ); final LineArray line = lines.get( trackID ); if ( null == line ) { return null; } line.getColor( index, color ); return color.get(); }
public void setTrackDisplayMode( final int mode ) { this.displayMode = mode; if ( displayMode == TrackMateModelView.TRACK_DISPLAY_MODE_WHOLE ) { final Color4f color = new Color4f(); for ( final Integer trackID : lines.keySet() ) { final LineArray line = lines.get( trackID ); for ( int i = 0; i < line.getVertexCount(); i++ ) { line.getColor( i, color ); color.w = 1f; line.setColor( i, color ); } } } }
/** * Sets the color of the given edge mesh. */ public void setColor( final DefaultWeightedEdge edge, final Color color ) { // First, find to what track it belongs to final int trackID = model.getTrackModel().trackIDOf( edge ); if ( null == edgeIndices.get( trackID ) || null == edgeIndices.get( trackID ).get( edge ) ) return; // Set color of corresponding line primitive final Color4f color4 = new Color4f(); final int index = edgeIndices.get( trackID ).get( edge ); final LineArray line = lines.get( trackID ); if ( null == line ) { return; } line.getColor( index, color4 ); final float[] val = color.getRGBColorComponents( null ); color4.x = val[ 0 ]; color4.y = val[ 1 ]; color4.z = val[ 2 ]; line.setColor( index, color4 ); line.setColor( index + 1, color4 ); }
/** * Sets the color of the given edge mesh. */ public void setColor( final DefaultWeightedEdge edge, final Color color ) { // First, find to what track it belongs to final int trackID = model.getTrackModel().trackIDOf( edge ); if ( null == edgeIndices.get( trackID ) || null == edgeIndices.get( trackID ).get( edge ) ) return; // Set color of corresponding line primitive final Color4f color4 = new Color4f(); final int index = edgeIndices.get( trackID ).get( edge ); final LineArray line = lines.get( trackID ); if ( null == line ) { return; } line.getColor( index, color4 ); final float[] val = color.getRGBColorComponents( null ); color4.x = val[ 0 ]; color4.y = val[ 1 ]; color4.z = val[ 2 ]; line.setColor( index, color4 ); line.setColor( index + 1, color4 ); }
line.getColor( index, color ); color.w = 0; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color );
line.getColor( index, color ); color.w = 0; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color ); color.w = tp; line.setColor( index, color ); line.getColor( index, color );