inline image transforms Is it possible to set an inline image transform's settings from the output of a Matrix block field?

For example 

{% set transform = {
  mode: 'block.imageMode',
  width: block.imageWidth,
  position: 'block.imageFocus'
} %}


Each time I've tried this, the image gives 404. I know the surrounding code works as expected because hard coding the values, the image displays as we'd expect.

This works just fine:

{% set transform = {
  mode: 'crop',
  width: 300,
  quality: 70,
  position: 'center-center'
} %}


EDIT:

Some surrounding code for context

{% for image in block.image %}

{% set transform = {
  mode: block.imageMode,
  width: block.imageWidth,
  quality: 70,
  position: block.focalPoint
} %}

&lt;div class="figure  image--{{ block.imagePosition }}"&gt;
  &lt;p&gt;
    &lt;img src="{{ image.getUrl(transform) }}" width="{{ image.getWidth(transform) }}" height="{{ image.getHeight(transform) }}" alt="{{ image.title }}"&gt;
    {% if image.title %}&lt;b class="figure__caption"&gt;{{ image.title }}&lt;/b&gt;{% endif %}
  &lt;/p&gt;
&lt;/div&gt;
&lt;!-- // .figure --&gt;

{% endfor %}
Try it without the quotes:

{% set transform = {
       mode: block.imageMode,
       width: block.imageWidth,
       position: block.imageFocus
   }
%}