Orthogonal and Oblique MPR Slicing and Fusion

If I could do this I could give some recognition to the Slicer team to Mayo.

@pieper

OK, I’ll give that some thought. Has anyone else done something similar?

One of their big requests was to have the UI look and feel match that of our QREADS application as much as possible.

@spycolyf This make sense. I just sent you a direct message with some suggestions to move forward with this by collaborating with Kitware.

@jcfr OK, I’ll take a look.

1 Like

There are several examples in the Slicer tests that could serve as inspiration. Or if you can get help from experts, as @jcfr suggests that could really help get you over the initial hurdles and customize from there.

The first hurdle for me is to have a successful process for downloading source code and get it running successfully. I’ll try to get Slicer working in debug mode inside of Visual Studio 2017. Is that doable with some ease?

I haven’t used 2017 in a while, but I have used VS 2019 with no problems lately. Building Slicer can be a challenge when you try to improvise, but if you follow the instructions exactly you should have no problems.

@pieper - Oh. Did I miss some thing? Where are those instructions. I 'll look on the website. Thanks.

Build instructions are here: https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/index.html

You cam start with this to ensure you have set up everything correctly, and then create a custom application, where you can customize everything in C++.

@lassoan, @pieper, @jcfr

Cool! I’ll keep you posted. You are so good and generous with your time. Thank you and have a great weekend and stay safe.

1 Like

Hello @lassoan @jcfr @pieper, @Sankhesh_Jhaveri

I’ve been off learning QT Creator and I built Slicer Release and debug. Wow! QT is powerful and Slicer is huge! I’m looking at the Slicer code in VS 2019. It’s overwhelming.

QT is the best and most flexible visual IDE WYSIWYG that I’ve used in my career. Here’s what I did with it so far. I designed the QREADS Toolbar…

After I create all of my widgets, if I want to use the resulting .ui file in Visual Studio, do I need to write any C++ code in QT? Or is all of the coding done in VS? Or a combination? If the coding is only done in VS, then I guess I’m done with using QT Creator, correct?

Thanks.

Hello Hello @lassoan @jcfr @pieper, @Sankhesh_Jhaveri,

I would like to introduce Liqin Wang (@Liqin), who is my teammate on this project. She is also a Mayo IT employee and she will be joining in at some point after she’s done with her current priority project working on our specialized DICOM receiver, processor and short term storage. She has some ITK experience.

Thanks

Thanks for the introduction.

@Liqin welcome to the Slicer community! Let us know if we can help with anything.

@Sankhesh_Jhaveri, @lassoan

I’ve spent a couple of days trying to get a my QPushButton to fire and signal and recognizing a slot. The strange thing is I’ve gotten gotten other button to work perfectly, and I set up this button the same exact way as the ones that work. But when the connect statement is executed on this one I get …

QObject::connect: No such slot QtVTKApp::setWidgetsEnabled()

I read something in StackOverflow that referenced the “moc_classname.cpp” file. Should that file be recreated every time I build? And if so, what do I do to fix it if it’s not recreating? Please let me know if you need clarification. Thanks.

spycolyfDoug Porter

2h

Here is the statement that generates the “No such slot” message…

connect(this->ui->setWidgetsEnabledToggle, SIGNAL(pressed()), this, SLOT(setWidgetsEnabled()));

virtual void setWidgetsEnabled();

the clickable property is set to true to make it a toggle.

I don’t know what is a QtVTKApp, probably it is an alternative to a Slicer-based application. We can help with debugging issues that you can reproduce in Slicer.

@lassoan @jcfr @pieper

Thanks for your response @lassoan. I just solve my problem. FYI: QtVTKApp is just a generic name I made up just to use as an example for this post.

I found my problem. Lesson learned: You can’t just make a copy of a VS C++ QT project and try to work from that copy without changing a bunch of paths in a few project files (my ignorance for not knowing CMake.)

The Meta-Object Compiler (MOC) is what makes signals and slots work and it’s automatically launched whenever you build a QT project in Visual Studio C++; and because I was working from a copy of the original project, the MOC AutogenInfo.json contained paths to the wrong mocs_compilation.cpp and other files. As a result, I was seeing no change when adding new events, and the new slots were not recognized. So I had to modify the AutogenInfo.json file to point to the current project and it worked fine afterwards.

I hope this can help others, but knowing CMake would help the most.

Thanks.

1 Like

I see, it makes sense. It’s good that you could figure it out. We’ll try to be more helpful next time.

@lassoan @jcfr @pieper,

No no, I don’t expect you to have solutions to all of my dumb mistakes. My apologies for taking up so much of your time. I’m just happy that I can contribute my issues and solutions to the forum to help others.

@lassoan @pieper @Sankhesh_Jhaveri

Hi, I’m trying to dynamically change the window level of images after I push button to change the W/L.

 vtkSmartPointer< vtkResliceImageViewer > riw;

… read in and displayed images.

riw->GetWindowLevel()->SetWindow(400);
riw->GetWindowLevel()->SetLevel(40);|
riw->Render();

This does not display the new W/L immediately but does so when I use the mouse interactively. I.e., after the code is executed there is no change; then when I press the left button down and move the mouse, the new W/L shows.

What is the correct way to accomplish this?