# How to set volume rendering preset using Python

**URL:** https://discourse.slicer.org/t/how-to-set-volume-rendering-preset-using-python/3063
**Category:** Development
**Tags:** volume-rendering, faq
**Created:** [June 4, 2018, 7:13am UTC](https://discourse.slicer.org/t/how-to-set-volume-rendering-preset-using-python/3063 "2018-06-04T07:13:30Z")
**Posts on this page:** 1
**Showing post:** 9

<div class="post-metadata">

### Author: ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)
#### Post date: [August 1, 2019, 4:06am UTC](https://discourse.slicer.org/t/how-to-set-volume-rendering-preset-using-python/3063/9 "2019-08-01T04:06:08Z")

</div>

> [@Yash\_Kumar\_Gumashta](#):
>
> slicer.util.loadVolume(“C:\Medical Data\MR-head.nrrd”) #Open the sample data set

Since `\` is an escape character in Python, the file path is incorrect, and so no volume will be loaded. See more details and description of correct syntax [here](https://discourse.slicer.org/t/load-valume-issue/2400/2).

---

_[View the full topic](https://discourse.slicer.org/t/how-to-set-volume-rendering-preset-using-python/3063)._
