SlicerQR Development

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!


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.

1 Like

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.

Yes, I installed TortoiseGit and it is really nice. I’ll tell my team about it for managing GIT for QREADS. Thanks for sharing that @lassoan

2 posts were split to a new topic: Is there a way to load images using the Python Interactor in Slicer?

@lassoan @pieper @jcfr,

Is it possible to position the image scroll slider at the bottom of the images rather than the top?

I’m proud of myself. Thanks to @lassoan helping me today, with TortoiseGit, I was able create a branch, make minor changes, commit, push, and then create a pull request. Lots more to learn, but it’s a start.

1 Like

@pieper @lassoan @jcfr

Can the mouse button event assignment be done in Python? For example, with the Python script, can I assign zoom to the mouse wheel down and drag, and pan to the left button, and W/L to simultaneous left and right buttons?

Maybe the SetEventTranslationClickAndDrag function?


I built the latest code and the title information still does not work. I tried the following and nothing printed in Python interactor. Does this mean that the code never gets executed?. Here’s where I placed the print statements in the code…

def _update():
  # Dictionary of name and values
  values = {QReadsLogic.DICOM_TAGS[tag]: value for tag, value in QReadsLogic.dicomTagValues(node).items()}

  print("*" * 40)
  print("*" * 40)

  # Update window title
  slicer.util.mainWindow().windowTitle = "CMRN: {PatientID}    Patient Name: {PatientName}     Study: {StudyDescription}     Series: {SeriesDescription}".format(**values)

To help others understand the context:

This code is called after a node is created, failing to see the information reported in the log file or python interactor probably means there are other errors happen beforehand during the loading of the data.

@jamesobutler @lassoan @pieper @jcfr

How do I show and un-show the ruler at the bottom of the image?


I can’t find it in the Script Repository.