# \[vtk.js\]How to apply imagestreamlines linewidth

**URL:** https://discourse.vtk.org/t/vtk-js-how-to-apply-imagestreamlines-linewidth/4074
**Category:** Web
**Created:** [August 26, 2020, 8:36am UTC](https://discourse.vtk.org/t/vtk-js-how-to-apply-imagestreamlines-linewidth/4074 "2020-08-26T08:36:37Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![1118](https://discourse.vtk.org/user_avatar/discourse.vtk.org/1118/32/1577_2.png) [@1118](https://discourse.vtk.org/u/1118)
#### Post date: [August 26, 2020, 8:36am UTC](https://discourse.vtk.org/t/vtk-js-how-to-apply-imagestreamlines-linewidth/4074/1 "2020-08-26T08:36:38Z")

</div>

Hello  
I have been trying to implement “Stream Lines Presentation plugin”([https://blog.kitware.com/new-animated-stream-lines-representation-for-paraview-5-3/](https://blog.kitware.com/new-animated-stream-lines-representation-for-paraview-5-3/)) in Paraview as vtk.js, so I have been looking at Imagestreamline Filiter in vtk.js.  
That being said, when I used the vtk.js Imagestreamline example code([https://kitware.github.io/vtk-js/examples/ImageStreamline.html](https://kitware.github.io/vtk-js/examples/ImageStreamline.html)), I am unable to apply one of its property, 'linewidth".

Example code:  
addRepresentation(‘streamLine’, sline, {  
diffuseColor: [0, 1, 1],  
lineWidth: 5,  
});

Is there a way to fix this problem?

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 26, 2020, 2:18pm UTC](https://discourse.vtk.org/t/vtk-js-how-to-apply-imagestreamlines-linewidth/4074/2 "2020-08-26T14:18:05Z")

</div>

`lineWidth` is something that is not supported in WebGL and it will require a fair amount of effort to enable it for WebGL.

Another solution could be to use the tube filter after the streamline one.

---

<div class="post-metadata">

### Author: ![1118](https://discourse.vtk.org/user_avatar/discourse.vtk.org/1118/32/1577_2.png) [@1118](https://discourse.vtk.org/u/1118)
#### Post date: [August 27, 2020, 10:08am UTC](https://discourse.vtk.org/t/vtk-js-how-to-apply-imagestreamlines-linewidth/4074/3 "2020-08-27T10:08:59Z")

</div>

Your answer was very helpful. Thank you. I will try looking at WebGL

---

<div class="post-metadata">

### Author: ![1118](https://discourse.vtk.org/user_avatar/discourse.vtk.org/1118/32/1577_2.png) [@1118](https://discourse.vtk.org/u/1118)
#### Post date: [August 28, 2020, 9:54am UTC](https://discourse.vtk.org/t/vtk-js-how-to-apply-imagestreamlines-linewidth/4074/4 "2020-08-28T09:54:23Z")

</div>

So, I’ve only been testing it on Windows10 until now but today I tested it on linux(centos7) web browser and linewidth worked fine. Do you know the reason for it?

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [August 28, 2020, 1:57pm UTC](https://discourse.vtk.org/t/vtk-js-how-to-apply-imagestreamlines-linewidth/4074/5 "2020-08-28T13:57:59Z")

</div>

Yes it is up to the browser to either respect the lineWidth information or not.  
The WebGL spec does not enforce it. It is part of the undefined behavior.
