faces(shape, inlet=None, outlet=None)[source]#

Generate an image with True values on the specified inlet and outlet faces

  • shape (list) – The [x, y, z (optional)] shape to generate. This will likely be obtained from im.shape where im is the image for which an array of faces is required.

  • inlet (int) – The axis where the faces should be added (e.g. inlet=0 will put True values on the x=0 face). A value of None (default) bypasses the addition of inlets.

  • outlet (int) – Same as inlet except for the outlet face. This is optional. It can be be applied at the same time as inlet, instead of inlet (if inlet is set to None), or ignored (if outlet = None).


faces – A boolean image of the given shape with True values on the specified inlet and/or outlet face(s).

Return type



Click here to view online example.