# Slicer on Virtual Windows OS

**URL:** <https://discourse.slicer.org/t/slicer-on-virtual-windows-os/5555>\
**Category:** Support\
**Created:** [January 29, 2019, 7:57am UTC](https://discourse.slicer.org/t/slicer-on-virtual-windows-os/5555 "2019-01-29T07:57:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anandmulay3](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anandmulay3](https://discourse.slicer.org/u/anandmulay3)\
**Post date:** [January 29, 2019, 7:57am UTC](https://discourse.slicer.org/t/slicer-on-virtual-windows-os/5555/1 "2019-01-29T07:57:48Z")

</div>

I’ve installed Slicer on my remote virtual windows 10 OS, i’m using a batch script to call scriptablemodule and its working fine. In this i’m creating a 3d model from a dicom series.  
The problem is the output model which is created on that remote virtual OS is different and causing large Holes in the output model, and the same thing if i runs on my laptop its working fine and gives right output model.  
what should i do to fix this issue, my virtual OS has 32+GB ram and also allocated GPU.

---

<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:** [January 30, 2019, 1:46am UTC](https://discourse.slicer.org/t/slicer-on-virtual-windows-os/5555/2 "2019-01-30T01:46:06Z")

</div>

This should not happen, since model generation is all implemented in the CPU and your virtual machine seems to be capable to deal with this task. If you shared a screenshot of the correct and incorrect result then it might give a hint of what could go wrong.

---

<div class="post-metadata">

**Author:** ![anandmulay3](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anandmulay3](https://discourse.slicer.org/u/anandmulay3)\
**Post date:** [January 30, 2019, 7:18am UTC](https://discourse.slicer.org/t/slicer-on-virtual-windows-os/5555/3 "2019-01-30T07:18:16Z")

</div>

The Skull model output on my laptop.:  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/d/2d96eac6bcfd7a120ff4ed001acc9a3ce255d4aa.png)  
The Skull model output on the virtual machine.:

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/f/2f6c8dbb4e0ab06791c0a28cf94dd351feb74a54.jpeg)

Input for both, is same.

---

<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:** [January 30, 2019, 10:11am UTC](https://discourse.slicer.org/t/slicer-on-virtual-windows-os/5555/4 "2019-01-30T10:11:45Z")

</div>

The image below looks smoother, so probably either the smoothing factor during surface generation is larger or voxel size segmentation labelmap voxel size is larger. Or maybe the threshold value is higher for some reason.

---

<div class="post-metadata">

**Author:** ![anandmulay3](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anandmulay3](https://discourse.slicer.org/u/anandmulay3)\
**Post date:** [January 30, 2019, 10:21am UTC](https://discourse.slicer.org/t/slicer-on-virtual-windows-os/5555/5 "2019-01-30T10:21:15Z")

</div>

the threshold parameters and smoothing parameters are same for both.  
Today i also noticed that if i manually runs my batch file on virtual machine it gives expected output.  
But if i invoke it from my remote program it gives me the second image output ☹

---

<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:** [January 31, 2019, 12:22am UTC](https://discourse.slicer.org/t/slicer-on-virtual-windows-os/5555/6 "2019-01-31T00:22:37Z")

</div>

What do you mean by running manually and invoking it? Do you run exactly the same command-line?  
Can you post the code that you use for batch conversion?

---

<div class="post-metadata">

**Author:** ![anandmulay3](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anandmulay3](https://discourse.slicer.org/u/anandmulay3)\
**Post date:** [January 31, 2019, 7:50am UTC](https://discourse.slicer.org/t/slicer-on-virtual-windows-os/5555/7 "2019-01-31T07:50:10Z")

</div>

DICOMInputPath =" "  
volumeOutputPath = " "  
slicer.modules.PythonInterfacerInstance.logic.Run(DICOMInputPath, volumeOutputPath)

this is the code in my batch file.  
if i run this batch file it runs perfectly, But if i invoke / call this batch file form my program/C# script . it gives me the second output.

---

<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:** [January 31, 2019, 10:57am UTC](https://discourse.slicer.org/t/slicer-on-virtual-windows-os/5555/8 "2019-01-31T10:57:29Z")

</div>

In this small piece of code there is nothing suspicious. Probably the problem is inside PythonInterfacerInstance.logic.
