SlicerQR Development

@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, the icons and Toolbar are uploaded and here are the links. Could you have a look? Thanks.

QReads.zip
QReads.UI.zip

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

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

image

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

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

To provide additional context, this is tracked by issue SlicerQReads#59, initial set of changes have already been integrated in PR SlicerQReads#56

Answering questions posted in this comment (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))?
  2. Are there any errors reported in the python interactor (Menu → View → Python Interactor) ?

@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)

I am copying your answer into issue SlicerQReads#59 and will provide further guidance there.

@jcfr

ok, I actually commented there as well. Thanks

For reference, see suggestions here

2 posts were split to a new topic: How to set initial size of the main window?

@superlib @jcfr

Important, please see your email!

Thanks

4 posts were merged into an existing topic: How to set initial size of the main window?

A post was merged into an existing topic: How to set initial size of the main window?

A post was merged into an existing topic: How to set initial size of the main window?

6 posts were split to a new topic: How to display web page in a dialog using Python?

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.

2 Likes

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

@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?

@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.

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.

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.