Code covered by the BSD License  

Highlights from
Volumetric Data Explorer

4.77778

4.8 | 12 ratings Rate this file 67 Downloads (last 30 days) File Size: 1.16 MB File ID: #41405
image thumbnail

Volumetric Data Explorer

by

 

29 Apr 2013 (Updated )

App for exploring higher dimensional data using volumetric visualizations and animation.

| Watch this File

File Information
Description

This app provides an interactive environment to explore four and five dimensional data using some of MATLAB's abilities for volumetric visualization and animation. It was originally designed for data that was measured in a 3D grid of data points, for example temperature or wind speed taken at each point in a 3D space. If this data is taken over time, it can also be animated. However any data that fits the form v = f(x,y,z) or v = f(x,y,z,t) can be used.

If you have any ideas for enhancements or find any bugs, please let me know below. I'm open to adding more options/features if people find this useful.

Please use the 'Watch this file' option on this page to get auto updates when I add/fix things in the app.

Current version tested with 64-bit R2013b on Windows 7, should work on other platforms as well. The source code for the app is now included as well. You can try to run this on older versions that do not support apps by running the DataExplorer class file. You will need to add the GUILayout-v1p12 folder and subfolders to your path.

Acknowledgements

Screen Capture Get A Screen Capture Of A Figure Frame Or Component, Gui Layout Toolbox, and Uigetvariables: Dialog To Pass Variables From Workspace Into Gui inspired this file.

Required Products MATLAB
MATLAB release MATLAB 8.2 (R2013b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (36)
07 Oct 2014 Adam Filion

Hi Dietmar,
That's correct. The errors come from another file exchange entry that I use under the hood, the GUI Layout Toolbox. An updated version of that entry has been released, and I'm working on updating the app to work with it. Stay tuned.

06 Oct 2014 Dietmar

This doesn't seem to run anymore in Matlab 2014b. Throws up a bunch of errors messages related to the new graphics subsystem...

04 Jul 2014 Prasad Kalane  
16 Apr 2014 Matthew Masarik  
17 Jan 2014 Henry Harrison

Hi Adam,

Awesome app. I'm adding this into my toolkit.

I actually made a similar tool a couple years back (it looks way uglier than this and half the features were never finished so I didn't upload it here). One feature that would be super useful is support for data of arbitrary dimensionality. I supported this by having the user select three dimensions to plot, and the rest show up as sliders. So the sliders collapse the space onto a 3D "hyper-slice".

It requires a whole bunch of indexing tricks to work with arrays where you don't know in advance how many dimensions they have, but I'd be happy to share with you my solutions if you're interested.

13 Jan 2014 Adam Filion

Hi Matthew, thanks for trying out the app. Looks like I missed a spot when I was fixing that earlier this year. I'm uploading a new version this morning that should fix that, so keep an eye out for it, not sure when it will go through.

Thanks, Adam

13 Jan 2014 Matthew Masarik

Hi Adam,

This looks like a very useful submission, and I would love to try it, but Iried firing this up today on my mac in 2013b and got the same error message as Martin back in July:

Error using isappdata
The uiextras.HBox object does not support application data."
Error in uiextras.Container/helpSetChildEnable (line 402)
if ~isappdata( child, 'OldEnableState' )
Error in uiextras.Container/set.Enable (line 219)
obj.helpSetChildEnable( ch(ii), obj.Enable_ );
Error in DataExplorer/LoadDataSetup (line 835)
set(app.ControlPanel,'Enable','off'); % disable animation
controls
Error in DataExplorer/ValidateData (line 774)
LoadDataSetup(app);
Error in DataExplorer/ImportWorkspaceCB (line 693)
ValidateData(app,data,names);
Error in DataExplorer>@(varargin)app.ImportWorkspaceCB(varargin{:}) (line 125)
app.ImportMenu(2) = uimenu(app.ImportMenu(1),'Label','Import from
Workspace','Callback',@app.ImportWorkspaceCB);
Error while evaluating uimenu Callback

Any thoughts? Thanks for your help.

14 Nov 2013 Dipti

Thanks Adam.

13 Nov 2013 Adam Filion

Hi Dipti, thanks for trying out the app. You can modify the current colormap through Options -> Set Colormap. You can pick from the default colormaps, invert the current colormap, or select Custom and select a variable from the workspace that contains a custom colormap. If you want to reuse a colormap or set it to be your default, use the Options -> Set/Load Options menu in the app.

If you are looking to interactively construct a custom colormap, the easiest way I know of is in the regular Figure menu Edit -> Colormap. See the help text at http://www.mathworks.com/help/releases/R2013b/matlab/ref/colormapeditor.html#f19-785301 for more info.

So you can open up a regular figure window and use the colormap editor to construct the one you want. Once you modify the colormap for the figure, you can grab it with a command like >> cm = get(gcf,'Colormap');
and then import that into the app using Options -> Set Colormap in the app. You can then use the Options -> Save/Load Options menu in the app to save it for later use.

And now this has got me wondering if I could just invoke that colormap editor directly in the app....I'll look into that.

13 Nov 2013 Dipti

Hi Adam,
The tool is really very nice and useful.
Great work.
I was wondering if there is an option here for editing the colormap value in this tool?
Its frequently needed option.
Thanks again for great tool.

27 Sep 2013 Adam Filion

Update has finally gone through, should fix the problem introduced in R2013b. The underlying code is also now directly included to make it easier to access.

05 Sep 2013 Adam Filion

I've submitted an update to the system today, keep an eye out I'm not sure when it will make it through. The error introduced in R2013b as noted by Martin has been fixed. This was actually an error in an underlying package from the File Exchange that I use, the GUI Layout Toolbox.

I have also now extracted the source code and included it in the submission. As I had previously noted in the submission description up top, you can extract this manually yourself, the mlappinstall file is really just a glorified zip, but I did that myself to make it easier for people to get at. In order to use the source code directly, add the GUILayout folder and subfolders to your path, then run the DataExplorer file.

19 Jul 2013 Adam Filion

Hi Martin, thanks for trying out the app. I'm still developing in R2013a as 13b is still in prerelease. I'll take a look to see if I can get it running in both versions.

19 Jul 2013 Martin Lechner

Updated sliders with continuous feedback works fine.

But in Matlab R2013b the following error appears:
Error using isappdata
The uiextras.HBox object does not support application data."
Error in uiextras.Container/helpSetChildEnable (line 402)
if ~isappdata( child, 'OldEnableState' )
Error in uiextras.Container/set.Enable (line 219)
obj.helpSetChildEnable( ch(ii), obj.Enable_ );
Error in DataExplorer (line 238)
set(app.VBox,'Enable','off');
Error in DataExplorer0x2D2App/startApp (line 60)
obj.AppHandle = eval('DataExplorer');
Error in DataExplorer0x2D2App (line 37)
startApp(obj)
Error in appinstall.internal.runapp>execute (line 75)
out = evalin('caller', [script ';']);
Error in appinstall.internal.runapp>runapp13a (line 57)
outobj = execute(fullfile(appinstalldir, [wrapperfile 'App.m']));
Error in appinstall.internal.runapp>runcorrectversion (line 35)
appobj = runapp13a(appinstalldir);
Error in appinstall.internal.runapp (line 17)
out = runcorrectversion(appmetadata, appentrypoint, appinstalldir);

01 Jul 2013 Adam Filion

Updated version is on its way, hopefully posted today or tomorrow, that incorporates some of the feedback from this forum. Try out V 1.5.0 when it's available and let me know if you have any further feedback!

27 Jun 2013 Adam Filion

Thanks for the feedback Matt! I'm surprised you had to change the renderer manually. My default rendered is painters, and I've never had any problems with the transparency. Likewise I haven't heard of anyone else needing to change the renderer manually. Still, I see your point and will update the app. As for the sliders, that's on my to-do list for the app, so keep an eye out for updates. Thanks!

27 Jun 2013 Matt Smith

Adam, this is a great start.

My defaultfigurerenderer was NOT 'opengl' and thus the transparency didn't render. There was no option within the app to fix this. I closed the app, and in the command line, did

>> set(0,'DefaultFigureRenderer','opengl')

and then reran the app and it worked. Consider setting the figure's renderer manually to opengl when you create it so you don't have to rely on user's potentially different default settings.

Another suggestion, have the sliders update the slices dynamically as you slide them. This can be done and there's material online to do this. I think I've used addListener to check for changes in the slider value, which will be changing as it slides.

Great functionality so far and a nice interface. Great job!

13 Jun 2013 Swati Tiwari  
10 Jun 2013 Martin Lechner

Thanks, for the fast respones. It works good.
Martin

07 Jun 2013 Adam Filion

Thanks for the feedback Martin. I've uploaded a new version that will hopefully get posted today (since I work for MathWorks there's a separate process that can take some time). It includes the isosurface sliders and an option for coloring that you suggested. I plan to add some of your other feedback when I have the time. Let me know if you have any other comments on it.

Thanks, Adam

06 Jun 2013 Martin Lechner

Hi Adam,

nice to hear, that you are continue to improve this great tool.

In the options menue (Options/Set Axes Names) I can change the x-, y- and z-axis labels but the description for the actual Level is for example always X Slice At.
I would suggest include the axis labels below the text X Slice At and so on. The area for displaying the value is high enough.
Minor Hint the dialog title for changing the axes label is wrong (Set Font ...).

Normaly the color value has a physical meaning, so i would like to have the possibility to add also a description to the colorbar. This description should also be shown below ISO Level 1 and 2.

If I missuse the time axis for a fifth dimension (other physical meaning than time), i want to change the description 'Current time:' for example to 'speed [km/h]:'.

I suggest to include this 2 labels in the menue for changing the axes labels.

Thanks, Martin

04 Jun 2013 Adam Filion

Thanks for trying out the app Martin, that's a lot of great feedback! To address your points:

- I'll check the dimension order and update doc where appropriate
- The warning you get when not importing a time vector stems from simplified (aka lazy) programming on my part that categorized missing and incorrectly sized time inputs the same. It's on my to-do list to separate those when I have the time so you can avoid the unnecessary warning.
- Animations for scrolling slices and rotations is a great idea, I'll see if I can find an easy-to-use way to implement it
- The colors and sliders for isosurfaces is another thing that's been on my to-do list, so keep an eye out for it in an update
- The colorbar is off by default because it slows down animation (I'm not sure why). You can use the Options menu -> Save/Load Options to turn it on then set the current options configuration to the default to it is always on when loading in data.
- Where else would you like to change the x/y/z/time/colorbar label?

Thanks, Adam

03 Jun 2013 Martin Lechner

Hi Adam,
the tool works really greate.
I had an issue with my own data:
From the documentation I thought that the 1st dimension is x (size(data,1)), 2nd is y and 3rd is z. Debugging of the code showed me that:
1st Dimension is y
2nd x
3rd z

Please improve the documentation or change the order.

Further suggestions for improvement:
Making a plot with 4D-Data and not provideing a time vector (like: DataExplorer(y,x,z,count) count is a 3D matrix) should not bring the following warning:
Warning: Invalid or missing time data, using defaults

My main purpose is the visualization of 3D Data, so I would like to have the possibility to create animations like:
* automatic scrolling the slices
* or rotate the orientation

Because my data often represents not x,y and z coordinates I would like to have the possibility to give custom x,y,z, time and colorbar value labels (not only the labels of the axis).

It would be great when the color of the isosurface would be the same as in the left plot on the colorbar (possibility to link the color).

A slider for the isosurface levels would be nice. The levels could be markers in the colorbar which can be moved throw the colorbar. The colorbar should be shown as default.

Nevertheless, a very good and useful tool.

Thanks, Martin

27 May 2013 Adam Filion

Hi jp,
Sorry to hear it still isn't working. I tried this out on a Debian install and everything worked fine, very stable. I don't have access to Ubuntu at the moment. I think you're right, it's some compatibility issue between your java and/or Ubuntu version and R2013a.

The only other thing I can suggest is to make sure your java and Ubuntu are up to date and supported by R2013a.

Thanks, Adam

27 May 2013 JP

Hi Adam,

I made the tests you suggested. The behaviour is very erratic, sometimes works fine but in the majority of the attempts the java error still appears, freezing the whole GUI... I'm sorry that I can't provide more details... It's probably some issue between matlab/java/ubuntu. Let me point out that such instabilities are indeed very common when running more complex 3D graphics under Linux.
cheers !
JP

24 May 2013 Adam Filion

Hi jp,

The error you are getting could be the result of loading in data that is not of type double or single, which are the only types supported by the built-in SLICE command used in the GUI. I thought I had added a check so that incorrect data types couldn't be imported form the workspace, but I guess I imagined that because I just did it myself.

Could you try:
- Opening the app, and checking that it looks like the screenshot on this page, minus the plotted data. If not, we need to sort that out first.
- If it's good, load one of the example data sets and see if that works
- Then try importing double or single precision data from workspace with a fresh startup of the app

While the beginning of the error is expected for an incorrect data type, the java error is not. I'm going to try this on a linux install and see if I can reproduce it.

Thanks, Adam

24 May 2013 JP

Hi Adam, thanks for your swift reply. I've reinstalled it using a different directory and managed to launch the app, but I'm still receiving lots of error msgs... I'm already runing as administrator.
Path gives me: /home/jpn12/Documents/MATLAB/Apps/DataExplorer - 2
/home/jpn12/Documents/MATLAB/Apps/DataExplorer - 2/Patch
/home/jpn12/Documents/MATLAB/Apps/DataExplorer - 2/html
/home/jpn12/Documents/MATLAB/Apps/DataExplorer - 2/metadata

and when loading some data (or trying the built-in examples) into the app I got:
Error using griddedInterpolant
Sample values must be a single or double array.
Error in interp3 (line 141)
F = griddedInterpolant(X, Y, Z, V, method,extrap);
Error in slicemod (line 100)
vi = interp3(x,y,z,v,xi,yi,zi,method);
Error in DataExplorer/RedrawSlice (line 984)
app.SliceHandle =
slicemod(app.SliceAxis,app.DimValues{1},app.DimValues{2},app.DimValues{3},app.Data(:,:,:,app.CurrentSample),SliceLoc(1),SliceLoc(2),SliceLoc(3));
Error in DataExplorer>@(varargin)app.RedrawSlice(varargin{:})
(line 178)
app.GridComp{1,2} =
uicontrol('Parent',app.SliceGrid,'Style','slider','Callback',@app.RedrawSlice);
Error while evaluating uicontrol Callback

java.lang.IllegalArgumentException: adding a container to a container on a different GraphicsDevice
at java.awt.Component.checkGD(Unknown Source)
at java.awt.Container.addImpl(Unknown Source)
at java.awt.Container.add(Unknown Source)
at com.mathworks.hg.peer.FigurePanel.doAdd(FigurePanel.java:215)
at com.mathworks.hg.peer.FigurePanel.assembleFigurePanel(FigurePanel.java:203)
at com.mathworks.hg.peer.FigurePanel.reconstructFigurePanel(FigurePanel.java:131)
at com.mathworks.hg.peer.FigurePanel.handleNotification(FigurePanel.java:88)
at com.mathworks.hg.peer.FigureNotificationHandlerImpl.forwardNotification(FigureNotificationHandlerImpl.java:62)
at com.mathworks.hg.peer.FigureNotificationHandlerImpl.handleNotification(FigureNotificationHandlerImpl.java:29)
at com.mathworks.hg.peer.FigureAxisComponentProxy.construct(FigureAxisComponentProxy.java:89)
at com.mathworks.hg.peer.FigureAxisComponentProxy.setVisual(FigureAxisComponentProxy.java:112)
at com.mathworks.hg.peer.FigureHG1Mediator.setClientVisual(FigureHG1Mediator.java:119)
at com.mathworks.hg.peer.HG1FigurePeer.setVisualImpl(HG1FigurePeer.java:169)
at com.mathworks.hg.peer.FigurePeer$25.run(FigurePeer.java:2552)
at com.mathworks.hg.util.HGPeerQueue$HGPeerRunnablesRunner.runit(HGPeerQueue.java:262)
at com.mathworks.hg.util.HGPeerQueue$HGPeerRunnablesRunner.runNotThese(HGPeerQueue.java:294)
at com.mathworks.hg.util.HGPeerQueue$HGPeerRunnablesRunner.run(HGPeerQueue.java:310)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

BTW: I'm using dual monitors, and I know Matlab doesn't behave well with this configuration sometimes...

tks, jp

23 May 2013 Adam Filion

Hi jp, thanks for trying out the app. I haven't seen that error before with the app. I only tested on win7 but I don't think that should be an issue.

My first guess is that this is a path issue. After loading the app, when you get the error, can you check the state of the MATLAB path? You can do so by entering >>path or using the Set Path utility in the home tab.

After loading the app, four folders should now be at the top of your path:
<approot>\DataExplorer
<approot>\DataExplorer\GUILayout-v1p12
<approot>\DataExplorer\GUILayout-v1p12\Patch
<approot>\DataExplorer\html

Where <approot> is the app install location, which you can set through the MATLAB Preferences -> Apps section.

The only other possibility I can think of is maybe some kind of permissions issue, though I kinda doubt it. In any case, can you try running MATLAB in administrator mode and use the app to see if that changes things?

Please confirm if your path is correct after loading the app, and I'll try thinking of some other possibilities in the meantime.

Thanks, Adam

23 May 2013 JP

Dear Adam,

it doesn't work for me... runing R2013a under ubuntu... Tks

Warning: Function /home/jpn12/rotinas matlab/dataexplorer/%2Buiextras/get.m has
the same name as a MATLAB builtin. We suggest you rename the function to avoid a
potential name conflict.
> In path at 110
In addpath at 87
In runapp at 10
Warning: Function /home/jpn12/rotinas matlab/dataexplorer/%2Buiextras/set.m has
the same name as a MATLAB builtin. We suggest you rename the function to avoid a
potential name conflict.
> In path at 110
In addpath at 87
In runapp at 10
Error using get (line 40)
Property name must begin with 'Default'.
Error in DataExplorer (line 100)
screensize = get(0,'ScreenSize');
Error in DataExplorer0x2D1App/startApp (line 60)
obj.AppHandle = eval('DataExplorer');
Error in DataExplorer0x2D1App (line 37)
startApp(obj)
Error in appinstall.internal.runapp>execute (line 69)
out = evalin('caller', [script ';']);
Error in appinstall.internal.runapp>runapp13a (line 51)
outobj = execute(fullfile(appinstalldir, [wrapperfile 'App.m']));
Error in appinstall.internal.runapp>runcorrectversion (line 35)
appobj = runapp13a(appinstalldir);
Error in appinstall.internal.runapp (line 17)
out = runcorrectversion(appmetadata, appentrypoint, appinstalldir);
>>

05 May 2013 Paul Andrews  
01 May 2013 Warwick

Terrific. Going to be very useful for my work in meteorology and climatology.

01 May 2013 Adam Filion

Thanks for the comment Matthew, I think that's a good suggestion. As you use it, let me know if there are any additional options/features that would be useful.

01 May 2013 Matthew

I really like:
* The GUI layout
* The documentation and help in first rate.
* The code style is pretty good.

I would suggest that name change would be appropriate. Maybe "Volumetric Data Explorer" would better suggest the applicability of your tool.

30 Apr 2013 Adam Filion

Bug fix is in, app has been updated to V 1.0.1

30 Apr 2013 Adam Filion

Hi Warwick,

Thanks for trying out the app. That's a bug I hadn't caught in testing. I'm updating the file, but since I work for MathWorks there's a separate submission process and I'm not sure when it will go through. Please use the 'Watch this file' link at the top of the page to get auto updates when the file changes.

Thanks, Adam

30 Apr 2013 Warwick

This is potentially a very useful app of 5 stars for my work. The demo data works well. However, after I put in a sample array of v = f(x,y,z) data, then any attempt to "Import from workspace" gives me errors as "Undefined function 'isdouble' for input arguments of type 'double'.
Error in
DataExplorer/ImportWorkspaceCB/@(in)(ndims(in)==4||ndims(in)==3)&&(isdouble(in)||issingle(in))

Error in uigetvariables (line 309)
t(jj) = evalin('base',['validationfunction_(' varnames{jj} ');']);
Error in DataExplorer/ImportWorkspaceCB (line 450)
data =
uigetvariables(text,'ValidationFcn',checkvars,'Introduction',intro);
Error in
DataExplorer>@(varargin)app.ImportWorkspaceCB(varargin{:})
(line 117)
app.Menu(2) = uimenu(app.Menu(1),'Label','Import from
Workspace','Callback',@app.ImportWorkspaceCB);
Error while evaluating uimenu Callback ".

Maybe a simple example at the Description would help me.

Updates
30 Apr 2013

V 1.0.1 - Fixed bug when importing from workspace.

06 May 2013

V 1.1.0 - When importing data from workspace, axes names will automatically update to match the names of the workspace variables. Added option to toggle audible MATLAB beep when warning on invalid data or settings.

06 May 2013

V 1.2.0
- Added option for saving/loading option preferences and setting default values
- Several minor bug fixes and improvements
- Added release notes to help doc, see those for more details

28 May 2013

V 1.3.0
- Added option to set frame rate when recording
- Fixed Help menu option to work on non-Windows platforms

29 May 2013

V 1.3.1
-Restricted data imported from workspace to type double, only data type supported for everything the app does.

07 Jun 2013

V 1.4.0
- Added sliders for ISO Level values
- Colorbar menu option now also adds colorbar for isosurface axis
- Added menu option to make color of isosurface match the colorbar

17 Jul 2013

V 1.5.0
-Updated sliders with continuous feedback
-Explicitly set figure's renderer to OpenGL to avoid issues with transparency
-Removed unnecessary warnings when not importing optional inputs
-Clarified help doc on dimension sizes of variables

27 Sep 2013

- Fixed error introduced in R2013b
- Now explicitly includes underlying app source code, no need to manually extract from .mlappinstall file

27 Sep 2013

Bug fix.

05 Dec 2013

V 1.6.0
Added option to open the colormap editor to interactively build custom colormaps to use in the app, found in Options -> Set Colormap -> Open Colormap Editor.

13 Jan 2014

V 1.6.1
- Fixed bug when importing 3D variable from workspace. This was the same bug as fixed in V 1.5.1 for 4D.

Contact us