Easy Hip Planner - how to -easy- turn code to extension?

Here’s the situation: I built an application (a Python script) for simple total hip arthroplasty planning. I can’t code at all – I used a few LLMs to get it done. I was testing how far I could go with programming without knowing how to code… and I may have gone a bit overboard.

But the app works (see pic) and does what it’s supposed to do, so I’d like to share it publicly for possible testing, feedback, comments – or maybe, most importantly, because someone might find it useful.

The approach is a bit unusual – it mainly uses X-rays (2D), but there’s also a 3D planning option. That probably makes it one of the most versatile orthopedic scripts out there :wink:

I understand I should probably turn it into an extension probably with extension manager?
The only issue is that the code is already 4500 lines long, which is more than even the best LLMs (like Gemini 2.5 or Sonnet 4) can reasonably handle. So if anyone’s willing to help – with advice or hands-on – I’d be grateful :slight_smile:

2 Likes

Hi, sounds like you’ve had a lot of fun with this!
I’ve been trying vibe coding Slicer modules in the past months, but none of the LLMs seem to have enough knowledge to completely develop and maintain a full working module. You need to keep correcting its mistakes and show good relevant examples for some steps.

I’d recommend that you make your code open source on GitHub now. If you add clear instructions and maybe a couple of test input too, somebody may get excited enough to help you add the Slicer extension.
There is a Slicer project week in a month when a lot of the community members dedicate some time to helping others: Welcome to the web page for the 43rd Project Week! | NA-MIC Project Weeks
Even if you cannot attend in person, it may be a good idea to attend the preparation meetings to find somebody who could guide you a little bit. But I think eventually you will need to learn some programming skills.

About long files: If you break down your code into a few logical modules as separate python files, then none of them will be too long for LLM agents to edit. And use the LLMs built into Visual Studio Code. That’s more effective than the web browser-based interfaces of the LLMs. You can specify the context so it reads all open code files before starting to edit one.

Please keep us updated!

Honestly, realizing that segmentation can be used in an unconventional way – and that I could build something like this myself without actually knowing how to code – was a bit of a joyful moment. On the other hand, I’ve also learned how slow and detail-oriented coding can be… much respect.

I’ll definitely check out Project Week.

I’ve been using VS Code for some time already – it really makes things easier. Without it, I probably would’ve gotten stuck much earlier.

Following your advice, I published the code on GitHub (which wasn’t that straightforward either :wink:):
https://github.com/P-Czum/EasyHipPlanner

All the best!