# SlicerQR Development

**URL:** <https://discourse.slicer.org/t/slicerqr-development/15954>\
**Category:** Development\
**Tags:** registration, build, segmentation, dicom, python\
**Created:** [February 11, 2021, 3:59pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954 "2021-02-11T15:59:22Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [March 12, 2021, 1:39am UTC](https://discourse.slicer.org/t/slicerqr-development/15954/98 "2021-03-12T01:39:19Z")

</div>

[@jcfr](https://github.com/jcfr), I’ve resized the QREADS toolbar and created new icons. I tried replacing the icons in the latest release that I downloaded from GitHub rebuilding it. I received errors. Don’t know what I did wrong.

[@jcfr](https://github.com/jcfr), the icons and Toolbar are uploaded and here are the links. Could you have a look? Thanks.

[QReads.zip](https://github.com/KitwareMedical/SlicerQReads/files/6126828/QReads.zip)  
[QReads.UI.zip](https://github.com/KitwareMedical/SlicerQReads/files/6126843/QReads.UI.zip)

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [March 15, 2021, 2:57pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/99 "2021-03-15T14:57:39Z")

</div>

Good Morning @lassoan @jcfr @pieper,  
We’re almost ready for prime time with just a couple of tasks left that will make a difference in acceptability and aesthetics.

- How do I set the color of the image panels background colors to black without changing the reference markers line colors to black? Currently, whenever I change the background colors, the corresponding reference markers take on the same colors
- How do I set the initial main window size
- I need to make the QREADS toolbar thinner and a fixed size, I changed the size in QT Creator and it displays like this. How do I eliminate the white space between the toolbar and the images

 ![NewQREADSToolBar](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/0/8/08aae34a8cdf618181fdfb9b9eeacd233d7b7e9b.jpeg)

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [April 7, 2021, 7:41pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/100 "2021-04-07T19:41:04Z")

</div>

JC did a great job replacing my icons. I’m happy with them.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/5/2/520d04b45629b2ad502b511432110f1c4193de11.png)

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [April 7, 2021, 7:45pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/101 "2021-04-07T19:45:21Z")

</div>

Hello Slicer team,

How can I replace the icon and the text in the title bar with DICOM header info? Here’s what I need…

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/c/2/c21c2769f978adcf408abb9e4908988580fab725.png)

Here is the Python code we tried that’s not working.

```
def _update():
  slicer.app.processEvents()
  slicer.app.layoutManager().resetThreeDViews()
  QReadsLogic.setZoom(self._parameterNode.GetParameter("Zoom"))

  tags = {
    "0010,0010": "PatientName",
    "0010,0020": "PatientID",
    "0008,1030": "StudyDescription",
    "0008,103e": "SeriesDescription"
  }
  # Dictionary of name and values
  values = {tags[tag]: value for tag, value in QReadsLogic.dicomTagValues(node, slicer.dicomDatabase, tags).items()}
  # Update window title
  slicer.util.mainWindow().windowTitle = "%s - %s" % (
    slicer.util.mainWindow().windowTitle,
    "CMRN: {PatientID} Patient Name: {PatientName} Study: {StudyDescription} Series: {SeriesDescription}".format(**values))

# Delay update to ensure images are rendered
qt.QTimer.singleShot(750, _update)

```

No matter what I try, This title comes up…

![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/d/6/d6a3ed954159f65df17ea8dea62b8b7319284ebf.png)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 7, 2021, 7:57pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/102 "2021-04-07T19:57:13Z")

</div>

To provide additional context, this is tracked by issue [SlicerQReads#59](https://github.com/KitwareMedical/SlicerQReads/issues/59), initial set of changes have already been integrated in [PR SlicerQReads#56](https://github.com/KitwareMedical/SlicerQReads/pull/56)

Answering questions posted in [this comment](https://github.com/KitwareMedical/SlicerQReads/issues/59#issuecomment-815175400) (also copied below for context) should help you move forward.

> Two things to check:
> 
> 1. Are the relevant changes also in the file contain in the build tree (for detailed see [#59 (comment)](https://github.com/KitwareMedical/SlicerQReads/issues/59#issuecomment-813537198))?
> 2. Are there any errors reported in the python interactor (Menu → View → Python Interactor) ?

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [April 7, 2021, 8:16pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/103 "2021-04-07T20:16:24Z")

</div>

@jcfr @pieper

Yes, the QREADS.py file in the Package contains those changes. My Package folder name is “C:\SlicerQREADS-Build\_4-5-2021\lib\SlicerQReads-4.13\qt-scripted-module. the qreads.py” file is dated 4/3/2021 3:02 PM. Also, the git log -n1 command shows the result expected. Is there anything else to check?

I tried changing the wait time to 10000 and that did not work.

qt.QTimer.singleShot(10000, \_update)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 7, 2021, 8:24pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/104 "2021-04-07T20:24:30Z")

</div>

I am copying your answer into issue [SlicerQReads#59](https://github.com/KitwareMedical/SlicerQReads/issues/59) and will provide further guidance there.

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [April 7, 2021, 8:31pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/105 "2021-04-07T20:31:51Z")

</div>

@jcfr

ok, I actually commented there as well. Thanks

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 7, 2021, 8:36pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/106 "2021-04-07T20:36:04Z")

</div>

For reference, see suggestions [here](https://github.com/KitwareMedical/SlicerQReads/issues/59#issuecomment-815240732)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 7, 2021, 9:26pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/107 "2021-04-07T21:26:45Z")

</div>

2 posts were split to a new topic: [How to set initial size of the main window?](https://discourse.slicer.org/t/how-to-set-initial-size-of-the-main-window/16991)

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [April 7, 2021, 9:15pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/108 "2021-04-07T21:15:55Z")

</div>

@superlib @jcfr

Important, please see your email!

Thanks

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 8, 2021, 12:48am UTC](https://discourse.slicer.org/t/slicerqr-development/15954/109 "2021-04-08T00:48:41Z")

</div>

4 posts were merged into an existing topic: [How to set initial size of the main window?](https://discourse.slicer.org/t/how-to-set-initial-size-of-the-main-window/16991/5)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 8, 2021, 1:02am UTC](https://discourse.slicer.org/t/slicerqr-development/15954/110 "2021-04-08T01:02:38Z")

</div>

A post was merged into an existing topic: [How to set initial size of the main window?](https://discourse.slicer.org/t/how-to-set-initial-size-of-the-main-window/16991/10)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 8, 2021, 1:01am UTC](https://discourse.slicer.org/t/slicerqr-development/15954/111 "2021-04-08T01:01:58Z")

</div>

A post was merged into an existing topic: [How to set initial size of the main window?](https://discourse.slicer.org/t/how-to-set-initial-size-of-the-main-window/16991/9)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [April 15, 2021, 9:59pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/112 "2021-04-15T21:59:22Z")

</div>

6 posts were split to a new topic: [How to display web page in a dialog using Python?](https://discourse.slicer.org/t/how-to-display-web-page-in-a-dialog-using-python/17112)

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [April 12, 2021, 6:03pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/115 "2021-04-12T18:03:46Z")

</div>

Thanks @lassoan,

I’m finally getting into the tutorials after 14 hour days of urgent changes to QREADS. We finished testing on Friday and now preparing for a big release tomorrow. I’m learning all about HelloPython and the Python Interactor. Hopefully, more intelligent question in the future. Thanks everyone for your patience.

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [April 13, 2021, 3:25pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/116 "2021-04-13T15:25:26Z")

</div>

Hey @pieper! You’ve done a great job with the SlicerWelcome tutorial. Thanks.

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [April 14, 2021, 3:56pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/117 "2021-04-14T15:56:13Z")

</div>

@lassoan, @pieper, @jcfr,

I’ve installed Visual Studio Code and the Python Extension, the Slicer Python Debugger Extension, set up remote debugger connection to Slicer and they are connected. In Slicer, I then loaded the SlicerQREADS module and I see no way to load the a volume as in the HelloPython example. No menu bar is visible at the top to Add Data\> @jcfr, how do I load the data so that I may then debug the Title bar demographics issue?

---

<div class="post-metadata">

**Author:** ![spycolyf](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@spycolyf](https://discourse.slicer.org/u/spycolyf)\
**Post date:** [April 14, 2021, 3:56pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/118 "2021-04-14T15:56:41Z")

</div>

@jcfr … also, I have a change for which I need to submit a pull request. Do I have the privileges in GitHub to do that? Can’t figure out how to create a branch in GitHub in order to do a pull request and merge the change into main after approval.

---

<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 14, 2021, 4:29pm UTC](https://discourse.slicer.org/t/slicerqr-development/15954/119 "2021-04-14T16:29:20Z")

</div>

> [@spycolyf](#):
>
> also, I have a change for which I need to submit a pull request. Do I have the privileges in GitHub to do that?

Yes, this is the beauty of distributed version control. You always have right to everything - in your own fork. You make all changes that you want, and then send a pull request to the official repository.

> [@spycolyf](#):
>
> Can’t figure out how to create a branch in GitHub in order to do a pull request and merge the change into main after approval.

I use TortoiseGit git client on Windows and it makes everything very simple, as I don’t need to memorize any commands but all operations are offered in the right-click menu in File explorer.

[Previous page](https://discourse.slicer.org/t/slicerqr-development/15954.md?page=3)

[Next page](https://discourse.slicer.org/t/slicerqr-development/15954.md?page=5)
