# I cannot find some config file while running SlicerVirtualReality tests

**URL:** <https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615>\
**Category:** Development\
**Tags:** virtual-reality\
**Created:** [April 26, 2019, 2:27am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615 "2019-04-26T02:27:55Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![JaceYang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jaceyang/32/3686_2.png) [@JaceYang](https://discourse.slicer.org/u/JaceYang)\
**Post date:** [April 26, 2019, 2:27am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/1 "2019-04-26T02:27:55Z")

</div>

I want to run qSlicerVirtualRealityModuleCxxTests but it says

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/4/c4345c663ceb9596e135a68211e9f29d6f3701ca.png)  
I already build Slicer and SlicerVirtualReality successfully.  
I cannot find qSlicerVirtualRealityModuleGenericCxxTestsLauncherSettings.ini in the SlicerVirtualReality source directory nor SlicerVirtualReality build directory.  
And the python error is annoying too.

---

<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 26, 2019, 2:54am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/2 "2019-04-26T02:54:24Z")

</div>

Do all the tests pass if you build the “RUN\_TESTS” project?

> [@JaceYang](#):
>
> And the python error is annoying too.

Please run Slicer using a Python debugger (as explained [here](https://www.slicer.org/wiki/Documentation/Nightly/Extensions/DebuggingTools)) to find what causes the error and send us a pull request with a proposed fix. We’ll review and integrate it quickly.

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 26, 2019, 2:58am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/3 "2019-04-26T02:58:50Z")

</div>

You need to start Visual Studio like this:

`Path\to\debug\build\Slicer-build\Slicer.exe --VisualStudio --launcher-no-splash --launcher-additional-settings ./SlicerVirtualReality_D/inner-build/AdditionalLauncherSettings.ini c:\d\_Extensions\SlicerVirtualReality_D\inner-build\SlicerVirtualReality.sln`

---

<div class="post-metadata">

**Author:** ![JaceYang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jaceyang/32/3686_2.png) [@JaceYang](https://discourse.slicer.org/u/JaceYang)\
**Post date:** [April 26, 2019, 6:51am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/4 "2019-04-26T06:51:47Z")

</div>

Um,No tests were found…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/e/7/e7b7f6e4790f40092a6fa0995c5dd84680612fc8.png)  
I downloaded the SlicerVirtualReality-master.zip.Did miss something?

---

<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 26, 2019, 12:38pm UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/5 "2019-04-26T12:38:10Z")

</div>

There are no tests at the superbuild solution (that builds all dependencies). Open the inner-build solution (…\inner-build\SlicerVirtualReality.sln) instead.

---

<div class="post-metadata">

**Author:** ![JaceYang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jaceyang/32/3686_2.png) [@JaceYang](https://discourse.slicer.org/u/JaceYang)\
**Post date:** [April 28, 2019, 1:23am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/6 "2019-04-28T01:23:07Z")

</div>

All tests passed.But I still cannot find the config files.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/d/3da7c01b6d66930f660ca02c0295039aabfa528c.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/8/9/8903ae8db83d3252f77dbfe22d431961cc8a740c.png)

---

<div class="post-metadata">

**Author:** ![JaceYang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jaceyang/32/3686_2.png) [@JaceYang](https://discourse.slicer.org/u/JaceYang)\
**Post date:** [April 28, 2019, 8:39am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/7 "2019-04-28T08:39:55Z")

</div>

I download the lastest source code of SlicerDebuggingTools and build it with VS2015x64.  
Then I launch the SlicerWithDebuggingTools.exe but it occurred an error which said “Slicer must be restarted after switching between VisualStudio debugger versions.”  
I restarted the Slicer(generated from source code) many times but it still not work.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/a/ba6d9d909d055bb2eb6fa75df25bba05c8fcfb63.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/f/a/fadd3cf0dbf64b4b462142698c7915c50a18a694.jpeg)

But the pythonDebuggingTools(installed in the Slicer by extension manager) works successfully in the Slicer which is installed from an executable binary file.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/9/3938f05450c1dbbf5a6a73e11e6acda721956390.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 29, 2019, 12:03am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/8 "2019-04-29T00:03:39Z")

</div>

It would help if you described what your overall goal is.

---

<div class="post-metadata">

**Author:** ![JaceYang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jaceyang/32/3686_2.png) [@JaceYang](https://discourse.slicer.org/u/JaceYang)\
**Post date:** [April 29, 2019, 1:10am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/9 "2019-04-29T01:10:23Z")

</div>

We are going to implement some functions which can let doctors manipulate organ models using mouse in Slicer at the same time the 3D view of SlicerVirtualReality will update synchronously and the patients can observe the same view with HTC VIVE equipped.  
But now I cannot use extension manager maybe due to openssl problem?(I’m not sure).And compiling openssl source code is complicated So I install SlicerDebuggingTool from source code(but it can’t work) aiming to solve the python error while running SlicerVirtualReality tests.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/2/b/2b2a54fbf77fac9404479bda3ec773af37045f60.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/7/379f1a15e5974f60614a901246ac999af8e27f62.png)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 29, 2019, 2:03pm UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/10 "2019-04-29T14:03:45Z")

</div>

Thanks for the explanation.

> [@JaceYang](#):
>
> solve the python error while running SlicerVirtualReality tests

This is the part I do not understand. If the build was successful and you can use SlicerVR, then why bother with the tests? Also if the build failed, or SlicerVR doesn’t work in some way then that should be addressed, not the tests.

---

<div class="post-metadata">

**Author:** ![JaceYang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jaceyang/32/3686_2.png) [@JaceYang](https://discourse.slicer.org/u/JaceYang)\
**Post date:** [April 30, 2019, 1:43am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/11 "2019-04-30T01:43:45Z")

</div>

Thank you very much for the suggestions.Now I start to search the frame redraw function in Slicer source code and I want to add the SlicerVR updateViewFromReferenceViewCamera code into it.Could you give some advices one more time?😂

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/b/5b415dccf30fd43cc4a533023ba0282b4cca0028.jpeg)

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [April 30, 2019, 12:55pm UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/12 "2019-04-30T12:55:12Z")

</div>

> [@JaceYang](#):
>
> frame redraw function

Not sure what this is.

> [@JaceYang](#):
>
> add the SlicerVR updateViewFromReferenceViewCamera code into it

Sorry but again I don’t understand what you’d like to achieve. Please give us a bit more info so that we don’t have to do guesswork.  
To reset the VR view you just need to call this function: [SlicerVirtualReality/VirtualReality/Widgets/qMRMLVirtualRealityView.h at master · KitwareMedical/SlicerVirtualReality · GitHub](https://github.com/KitwareMedical/SlicerVirtualReality/blob/master/VirtualReality/Widgets/qMRMLVirtualRealityView.h#L98)

---

<div class="post-metadata">

**Author:** ![JaceYang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jaceyang/32/3686_2.png) [@JaceYang](https://discourse.slicer.org/u/JaceYang)\
**Post date:** [May 5, 2019, 1:43am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/13 "2019-05-05T01:43:09Z")

</div>

I want to complete this:  
When I rotate the model(or scene) by left button click or move it by wheel click or zoom it by scrolling the wheel ,Slicer can automatically call the “Set virtual reality view to match reference view”（match view for short） function instead of I clicking the virtualReality toolbar button.  
I guess the scene will rerender when it is changed.So I want to add the match view code into the scene rerender function.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/b/4bc3e533a6311ad72ea6fb4db4730c7f1adc2103.jpeg)  
Thanks again for your attention! I just return from the holiday.😂

---

<div class="post-metadata">

**Author:** ![JaceYang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jaceyang/32/3686_2.png) [@JaceYang](https://discourse.slicer.org/u/JaceYang)\
**Post date:** [May 6, 2019, 7:06am UTC](https://discourse.slicer.org/t/i-cannot-find-some-config-file-while-running-slicervirtualreality-tests/6615/14 "2019-05-06T07:06:17Z")

</div>

We have found the functions that we are going to modify.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/e/9e9bc5729465ea748e1025860172e2c4209d3316.png)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/9/c90fdb28484928b5a4c3612e2059ecaf1fc3e525.png)  
What we are going to do is this:  
Adding function “updateViewFromReferenceViewCamera” into function “ProcessMRMLEvents” so that every time I click and drag mouse in the Slicer 3D View, the code in the “ProcessMRMLEvents” function will execute and then the view in HTC VIVE will update immediately.  
So the problem we are facing is this:  
Integrating the SlicerVirtualReality into Slicer so that we can call function “updateViewFromReferenceViewCamera” in function “ProcessMRMLEvents”.But how can we do that?  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/2/d28222aeb98081c1feeea4c05cdb8dc9485681a6.png)
