# reload slicerrc.py without having to restart slicer

**URL:** https://discourse.slicer.org/t/reload-slicerrc-py-without-having-to-restart-slicer/6638
**Category:** Support
**Created:** [April 29, 2019, 3:08am UTC](https://discourse.slicer.org/t/reload-slicerrc-py-without-having-to-restart-slicer/6638 "2019-04-29T03:08:08Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![maxaerosat.co.za](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@maxaerosat.co.za](https://discourse.slicer.org/u/maxaerosat.co.za)
#### Post date: [April 29, 2019, 3:08am UTC](https://discourse.slicer.org/t/reload-slicerrc-py-without-having-to-restart-slicer/6638/1 "2019-04-29T03:08:08Z")

</div>

I somehow can create new customised volume rendering presets as per explanations  
however at present need to restart slicer to see the effects as i need the slicerrc.py file to be read

Is there a way to re read the slicerrc.py file without having to restart slicer

ps : is there anywhere a good detailed explanation for all the settings in custom volume presets  
ie the format of the numbers ; pairs / triplets etc  
Thanks  
Greatly appreciated

---

<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: [April 29, 2019, 3:14am UTC](https://discourse.slicer.org/t/reload-slicerrc-py-without-having-to-restart-slicer/6638/2 "2019-04-29T03:14:30Z")

</div>

You can experiment with copy-pasting code to the Python console. Once you have the final code snippet, you can put it in your .slicerrc file.

Format of volume property file is described in the [volume rendering module documentation](https://www.slicer.org/wiki/Documentation/Nightly/Modules/VolumeRendering#Format_of_Volume_Property_.28.vp.29_file). Volume rendering transfer functions are explained in [VTK textbook](https://www.kitware.com/products/books/VTKTextbook.pdf).

---

<div class="post-metadata">

### Author: ![maxaerosat.co.za](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@maxaerosat.co.za](https://discourse.slicer.org/u/maxaerosat.co.za)
#### Post date: [May 12, 2019, 12:11pm UTC](https://discourse.slicer.org/t/reload-slicerrc-py-without-having-to-restart-slicer/6638/3 "2019-05-12T12:11:20Z")

</div>

Thanks for the reply ; Have achieved what i wanted ( the long way ) multiple anchor points on a preset and alter them when using slicer ; I came across this code propNode = displayNode.GetVolumePropertyNode()  
volumeProp = propNode.GetVolumeProperty()  
slicer.modules.volumerendering.logic().SetThresholdToVolumeProp(self.scalarRange,[thresholdLevel - thresholdWindow/2, thresholdLevel + thresholdWindow/2],volumeProp,True,True)  
color = vtk.vtkColorTransferFunction()  
color.AddRGBPoint(-3000, 0, 0, 0)  
color.AddRGBPoint(thresholdLevel-self.thresholdWindow/2, 0.6, 0.3, 0.2)  
color.AddRGBPoint(thresholdLevel, 1.0, 1.0, 1.0)  
color.AddRGBPoint(thresholdLevel+self.thresholdWindow/2, 1.0, 0.9, 0.9)  
color.AddRGBPoint(3000, 0.8, 0.7, 1.0)  
volumeProp.SetColor(color)  
from another discussion ;  
which i can find verry useful ;  
however when i try it the volume does not respond ; ie aware the line with the feachure i want is the second last and need to alter the x position and the corresponding rgb values , slicer find no error in the code but the volume does not respond with the altered values ; any advice would be useful to me
