Smoother BigDataViewer navigation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Smoother BigDataViewer navigation

Thomas
Dear List,

I would like to use BigDataViewer (BDV) for the visualization of volumetric anisotropic electron microscopy data of brain tissue (similar to the drosophila dataset mentioned in the BDV publication) and have the following questions related to the navigation speed:

1. I would like to get a smooth navigation in the z-direction with a high frame rate (say up to 30 Hz) for a field of view of about 200x200 up to 500x500 pixels (and staying orthogonal to the x-y plane, no tilting needed). So far I have tried quite a few different mipmap parameters and saved the HDF5 file on an SSD drive on a powerful workstation, but it is not as smooth as what is achieved with stacks loaded in memory with Fiji or with softwares that also optimize data loading such as Knossos. Are there parameters that would optimize such a navigation, or is it not compatible with the data loading scheme of BDV that might be more optimized for reslicing ?
2. How can the z-axis increment step be set ? It seems to depend on the magnification factor and is less than 1 at the magnification factor I want to use, meaning that I need a few key presses to move to the next slice.

3. Can the frame rate be adjusted for when the ',' and '.' keyboard navigation buttons are hold down ?

Thank you very much for your help
Best regards
Thomas

--
--
Please avoid top-posting, and please make sure to reply-to-all!
 
Mailing list web interface: http://groups.google.com/group/fiji-devel

---
You received this message because you are subscribed to the Google Groups "Fiji-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Smoother BigDataViewer navigation

Tobias Pietzsch
Hi Thomas,

On 28 Sep 2015, at 01:23, Thomas <[hidden email]> wrote:

Dear List,

I would like to use BigDataViewer (BDV) for the visualization of volumetric anisotropic electron microscopy data of brain tissue (similar to the drosophila dataset mentioned in the BDV publication) and have the following questions related to the navigation speed:

1. I would like to get a smooth navigation in the z-direction with a high frame rate (say up to 30 Hz) for a field of view of about 200x200 up to 500x500 pixels (and staying orthogonal to the x-y plane, no tilting needed). So far I have tried quite a few different mipmap parameters and saved the HDF5 file on an SSD drive on a powerful workstation, but it is not as smooth as what is achieved with stacks loaded in memory with Fiji or with softwares that also optimize data loading such as Knossos. Are there parameters that would optimize such a navigation, or is it not compatible with the data loading scheme of BDV that might be more optimized for reslicing ?

It is hard to judge the speed without seeing it.
It is definitely true that rendering BDV is not as fast as moving through slices in a Fiji stack. This is because BDV *always* does the re-slicing computation. This means there is a coordinate transformation, interpolation, and type conversion for every pixel that is rendered on the screen. This is currently all done in software and there is no optimization for special cases, like no tilting. In contrast, moving to the next slice in a Fiji stack is basically just a memcopy without any intermediate transformations etc.

That beeing said, 30Hz at 500x500 doesn’t seem so unreasonable. Are you at least getting close to that?
Is it always too slow, or just when it is reading from disk. If you are browsing the same local area repeatedly, the data should be in RAM.
What OS and Java version are you using? What is the max memory setting of Fiji?

2. How can the z-axis increment step be set ? It seems to depend on the magnification factor and is less than 1 at the magnification factor I want to use, meaning that I need a few key presses to move to the next slice.

The increment in z is always the same size as 1 pixel width on the screen. So you are right, it depends on the magnification factor.
It currently cannot be configured. I’ll put that on my TODO list...

3. Can the frame rate be adjusted for when the ',' and '.' keyboard navigation buttons are hold down ?

No, this cannot be adjusted. Actually, there is no notion currently of ',' and ‘.’. This is just the systems keyboard repeat rate, .i.e, if the events that are processed are the same as if pressing and holding a key when entering text.
I can look into changing that.

best regards,
Tobias


Thank you very much for your help
Best regards
Thomas


--
--
Please avoid top-posting, and please make sure to reply-to-all!
 
Mailing list web interface: http://groups.google.com/group/fiji-devel

---
You received this message because you are subscribed to the Google Groups "Fiji-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
--
Please avoid top-posting, and please make sure to reply-to-all!
 
Mailing list web interface: http://groups.google.com/group/fiji-devel

---
You received this message because you are subscribed to the Google Groups "Fiji-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Smoother BigDataViewer navigation

Thomas
Hi Tobias,

thank you for your answer.

On Monday, September 28, 2015 at 4:59:26 PM UTC+2, Tobias Pietzsch wrote:
Hi Thomas,

On 28 Sep 2015, at 01:23, Thomas <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="NR4Wu91yBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">thomas_...@...> wrote:

Dear List,

I would like to use BigDataViewer (BDV) for the visualization of volumetric anisotropic electron microscopy data of brain tissue (similar to the drosophila dataset mentioned in the BDV publication) and have the following questions related to the navigation speed:

1. I would like to get a smooth navigation in the z-direction with a high frame rate (say up to 30 Hz) for a field of view of about 200x200 up to 500x500 pixels (and staying orthogonal to the x-y plane, no tilting needed). So far I have tried quite a few different mipmap parameters and saved the HDF5 file on an SSD drive on a powerful workstation, but it is not as smooth as what is achieved with stacks loaded in memory with Fiji or with softwares that also optimize data loading such as <a href="http://www.knossostool.org/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fwww.knossostool.org%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHEl7CLRzyrhPbyKltjoSSZj5TTkw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fwww.knossostool.org%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHEl7CLRzyrhPbyKltjoSSZj5TTkw&#39;;return true;">Knossos. Are there parameters that would optimize such a navigation, or is it not compatible with the data loading scheme of BDV that might be more optimized for reslicing ?

It is hard to judge the speed without seeing it.
It is definitely true that rendering BDV is not as fast as moving through slices in a Fiji stack. This is because BDV *always* does the re-slicing computation. This means there is a coordinate transformation, interpolation, and type conversion for every pixel that is rendered on the screen. This is currently all done in software and there is no optimization for special cases, like no tilting. In contrast, moving to the next slice in a Fiji stack is basically just a memcopy without any intermediate transformations etc.

That beeing said, 30Hz at 500x500 doesn’t seem so unreasonable. Are you at least getting close to that?
Is it always too slow, or just when it is reading from disk. If you are browsing the same local area repeatedly, the data should be in RAM.
What OS and Java version are you using? What is the max memory setting of Fiji?


Hard to tell. 

At high magnification, as the increment step is too small, it is hard to see a difference between loaded/unloaded data.
At low magnification (about 2000x2000 pixels), I see a difference between loaded unloaded data on a Raid array, but not on the SSD.

Oh, I just found out about holding shift to go faster.

With shift/high mag/SSD : actually quite smooth
With shift/very high mag so that increment is about 1 section/SSD : well smooth
With shift/very high mag so that increment is about 1 section/RAID array : smooth too, but maybe less when loading data

Hum, I am unsure about the lack of smoothness now  ... it might actually come also from the non-1 increment step. I think that I would be able to have a better impression about smoothness with single increment steps and knowing at which frame rate I am browsing.

Windows 2012 Server, java jdk1.6.0_24 from Fiji, 110GB Fiji RAM
 
2. How can the z-axis increment step be set ? It seems to depend on the magnification factor and is less than 1 at the magnification factor I want to use, meaning that I need a few key presses to move to the next slice.

The increment in z is always the same size as 1 pixel width on the screen. So you are right, it depends on the magnification factor.
It currently cannot be configured. I’ll put that on my TODO list...


Oh that would be great, thanks.

3. Can the frame rate be adjusted for when the ',' and '.' keyboard navigation buttons are hold down ?

No, this cannot be adjusted. Actually, there is no notion currently of ',' and ‘.’. This is just the systems keyboard repeat rate, .i.e, if the events that are processed are the same as if pressing and holding a key when entering text.
I can look into changing that.


That's a bit more cosmetic than the 1-increment, but that would be nice too.

Thank you for your help and this nice browser
Best regards
Thomas

 
best regards,
Tobias


Thank you very much for your help
Best regards
Thomas


--
--
Please avoid top-posting, and please make sure to reply-to-all!
 
Mailing list web interface: <a href="http://groups.google.com/group/fiji-devel" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://groups.google.com/group/fiji-devel&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/fiji-devel&#39;;return true;">http://groups.google.com/group/fiji-devel

---
You received this message because you are subscribed to the Google Groups "Fiji-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="NR4Wu91yBgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">fiji-devel+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
--
Please avoid top-posting, and please make sure to reply-to-all!
 
Mailing list web interface: http://groups.google.com/group/fiji-devel

---
You received this message because you are subscribed to the Google Groups "Fiji-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Smoother BigDataViewer navigation

Thomas
Hi,
I realized that one can navigate in BDV simply by setting the 3d transform of the viewer (my python script is below).

So it is finally rather smooth at 30Hz except that there are some short "freezes" that happen regularly. For example at 30 Hz, navigating 1000 sections on an SSD with a 800x600 field of view gives the following freezes:

slice number / refresh time (s)
100 0.549000024796
268 0.3140001297
437 0.53400015831
608 0.517999887466
784 0.563999891281
957 0.532999992371

My mipmap setup was: 1,1,1/2,2,1/4,4,1/8,8,1/16,16,1, chunk size 16 for all. Maybe there is a better mipmap setup for such browsing ?

So finally the navigation in this mode is quite smooth, with a few short freezes every about 5 seconds.

Thanks for your help
Best regards
Thomas


from bdv import BigDataViewer
from bdv.export import ProgressWriterConsole
from net.imglib2.realtransform import AffineTransform3D
from bdv.viewer import DisplayMode
import time

path = 'F:\\ThomasFast\\export.xml'

v = BigDataViewer(path, 'BDV Title', ProgressWriterConsole())

v.getViewer().setDisplayMode( DisplayMode.FUSED )
v.getViewerFrame().setVisible( True )

transform = AffineTransform3D()
mag = 1
speed = 30
t = time.time()
for i in range(1000):
transform.set(
mag, 0, 0, 0,
0,mag, 0, 0,
0, 0, mag, -mag*i);
v.getViewer().setCurrentViewerTransform( transform );
time.sleep(1/float(speed))
elapsed = time.time() - t
t = time.time()
if elapsed > 0.05:
print i, elapsed



On Tuesday, September 29, 2015 at 2:11:36 AM UTC+2, Thomas wrote:
Hi Tobias,

thank you for your answer.

On Monday, September 28, 2015 at 4:59:26 PM UTC+2, Tobias Pietzsch wrote:
Hi Thomas,

On 28 Sep 2015, at 01:23, Thomas <[hidden email]> wrote:

Dear List,

I would like to use BigDataViewer (BDV) for the visualization of volumetric anisotropic electron microscopy data of brain tissue (similar to the drosophila dataset mentioned in the BDV publication) and have the following questions related to the navigation speed:

1. I would like to get a smooth navigation in the z-direction with a high frame rate (say up to 30 Hz) for a field of view of about 200x200 up to 500x500 pixels (and staying orthogonal to the x-y plane, no tilting needed). So far I have tried quite a few different mipmap parameters and saved the HDF5 file on an SSD drive on a powerful workstation, but it is not as smooth as what is achieved with stacks loaded in memory with Fiji or with softwares that also optimize data loading such as <a href="http://www.knossostool.org/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fwww.knossostool.org%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHEl7CLRzyrhPbyKltjoSSZj5TTkw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\75http%3A%2F%2Fwww.knossostool.org%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHEl7CLRzyrhPbyKltjoSSZj5TTkw&#39;;return true;">Knossos. Are there parameters that would optimize such a navigation, or is it not compatible with the data loading scheme of BDV that might be more optimized for reslicing ?

It is hard to judge the speed without seeing it.
It is definitely true that rendering BDV is not as fast as moving through slices in a Fiji stack. This is because BDV *always* does the re-slicing computation. This means there is a coordinate transformation, interpolation, and type conversion for every pixel that is rendered on the screen. This is currently all done in software and there is no optimization for special cases, like no tilting. In contrast, moving to the next slice in a Fiji stack is basically just a memcopy without any intermediate transformations etc.

That beeing said, 30Hz at 500x500 doesn’t seem so unreasonable. Are you at least getting close to that?
Is it always too slow, or just when it is reading from disk. If you are browsing the same local area repeatedly, the data should be in RAM.
What OS and Java version are you using? What is the max memory setting of Fiji?


Hard to tell. 

At high magnification, as the increment step is too small, it is hard to see a difference between loaded/unloaded data.
At low magnification (about 2000x2000 pixels), I see a difference between loaded unloaded data on a Raid array, but not on the SSD.

Oh, I just found out about holding shift to go faster.

With shift/high mag/SSD : actually quite smooth
With shift/very high mag so that increment is about 1 section/SSD : well smooth
With shift/very high mag so that increment is about 1 section/RAID array : smooth too, but maybe less when loading data

Hum, I am unsure about the lack of smoothness now  ... it might actually come also from the non-1 increment step. I think that I would be able to have a better impression about smoothness with single increment steps and knowing at which frame rate I am browsing.

Windows 2012 Server, java jdk1.6.0_24 from Fiji, 110GB Fiji RAM
 
2. How can the z-axis increment step be set ? It seems to depend on the magnification factor and is less than 1 at the magnification factor I want to use, meaning that I need a few key presses to move to the next slice.

The increment in z is always the same size as 1 pixel width on the screen. So you are right, it depends on the magnification factor.
It currently cannot be configured. I’ll put that on my TODO list...


Oh that would be great, thanks.

3. Can the frame rate be adjusted for when the ',' and '.' keyboard navigation buttons are hold down ?

No, this cannot be adjusted. Actually, there is no notion currently of ',' and ‘.’. This is just the systems keyboard repeat rate, .i.e, if the events that are processed are the same as if pressing and holding a key when entering text.
I can look into changing that.


That's a bit more cosmetic than the 1-increment, but that would be nice too.

Thank you for your help and this nice browser
Best regards
Thomas

 
best regards,
Tobias


Thank you very much for your help
Best regards
Thomas


--
--
Please avoid top-posting, and please make sure to reply-to-all!
 
Mailing list web interface: <a href="http://groups.google.com/group/fiji-devel" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://groups.google.com/group/fiji-devel&#39;;return true;" onclick="this.href=&#39;http://groups.google.com/group/fiji-devel&#39;;return true;">http://groups.google.com/group/fiji-devel

---
You received this message because you are subscribed to the Google Groups "Fiji-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fiji-devel+...@googlegroups.com.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
--
Please avoid top-posting, and please make sure to reply-to-all!
 
Mailing list web interface: http://groups.google.com/group/fiji-devel

---
You received this message because you are subscribed to the Google Groups "Fiji-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...