Skip to content

[MRG] Added a volume_slice helper function in mlab.#435

Merged
prabhuramachandran merged 3 commits into
enthought:masterfrom
emmanuelle:slice
Oct 5, 2016
Merged

[MRG] Added a volume_slice helper function in mlab.#435
prabhuramachandran merged 3 commits into
enthought:masterfrom
emmanuelle:slice

Conversation

@emmanuelle
Copy link
Copy Markdown
Contributor

volume_slice plots an image plane sliced through volumetric data.

This PR addresses #430. I chose volume_slice instead of image_slice that was proposed in #430, since I thought it was clearer (a slice through volumetric data), but I'm open to changing the name of course.

In addition to the function itself, I tried to modify the documentation as well, but I'm not sure whether I did it well or not since I get an error when building the doc:

make -f MakefileMayavi html
make[1]: Entering directory '/home/emma/travail/projects/mayavi/docs'
sphinx-build -b html -d build/mayavi/doctrees   source/mayavi build/mayavi/html
Making output directory...
Running Sphinx v1.2.3
loading pickled environment... not yet created

Theme error:
no theme named 'classic' found (missing theme.conf?)
MakefileMayavi:34: recipe for target 'html' failed
make[1]: *** [html] Error 1
make[1]: Leaving directory '/home/emma/travail/projects/mayavi/docs'
Makefile:34: recipe for target 'html' failed
make: *** [html] Error 2

volume_slice plots an image plane sliced through volumetric data
@codecov-io
Copy link
Copy Markdown

codecov-io commented Aug 20, 2016

Current coverage is 50.32% (diff: 41.17%)

Merging #435 into master will decrease coverage by <.01%

@@             master       #435   diff @@
==========================================
  Files           257        257          
  Lines         23219      23236    +17   
  Methods           0          0          
  Messages          0          0          
  Branches       3070       3071     +1   
==========================================
+ Hits          11687      11694     +7   
- Misses        10783      10793    +10   
  Partials        749        749          

Powered by Codecov. Last update 31578f6...08523cc

@prabhuramachandran
Copy link
Copy Markdown
Member

@emmanuelle -- thanks for this, it looks great overall. The classic theme is just the classic sphinx theme. I have version 1.3.5, looks like you have an older 1.2.x version. I'm a bit swamped today so I will take a closer look over the next couple of days. Would it be possible to add a tiny non-UI test along the lines of

https://github.com/enthought/mayavi/blob/master/mayavi/tests/test_mlab_integration.py#L230

but put it under this class:

https://github.com/enthought/mayavi/blob/master/mayavi/tests/test_mlab_integration.py#L303

It shouldn't take too long I hope, just a simple test exercising the pipeline and making sure it all works. For example it would be nice to check if setting the axis is honored. If there are issues doing this on account of the null engine, please let me know. Thanks!!

@emmanuelle
Copy link
Copy Markdown
Contributor Author

@prabhuramachandran is it the kind of unit test that you were expecting? I'm not sure I understand completely what you were asking for, but I gave it a try :-).

I managed to build the doc with a more recent version of sphinx.

@emmanuelle
Copy link
Copy Markdown
Contributor Author

ping @prabhuramachandran :-)

@emmanuelle emmanuelle changed the title [WIP] Added a volume_slice helper function in mlab. [MRG] Added a volume_slice helper function in mlab. Sep 17, 2016
@GaelVaroquaux
Copy link
Copy Markdown
Contributor

Could you add a ref to this function in the section
http://docs.enthought.com/mayavi/mayavi/mlab.html#case-studies-of-some-visualizations
in the "Cut planes" part.

Aside from that, LGTM.

@emmanuelle
Copy link
Copy Markdown
Contributor Author

Good idea, thanks! I added a reference, tell me if it's OK. I also mentioned that when creating several visualizations from a single NumPy array, it's better to use the pipeline syntax than duplicating data sources with several mlab functions. Not sure it's needed, but I think it's not obvious for all users. Tell me what you think.

@prabhuramachandran
Copy link
Copy Markdown
Member

@emmanuelle -- very sorry for the slow response, I had some deadlines and didn't notice this thread due to a faulty email filter. Anyway, this looks perfect! Thank you so much for all your attention to detail! Am merging this right away! Thanks again!

@prabhuramachandran prabhuramachandran merged commit bc07c00 into enthought:master Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants