Python Module Logic Class

Hello! We are working on testing our module, but it only sets the image to the FA.nrrd because of the ScriptedLoadableModuleTest.

As you can see, our code uses a pre-placed fiducial point to create a segment around it(called lumbar in this case). Then it sets the parameters for the local threshold function, but the function doesn’t complete. What I mean by that is it sets the parameters but doesn’t control-click/run the function. We think this is because of our logic function.

Does anyone know how to alter the run function in the Scripted Loadable Module Logic to actually run your own program? Is that where we put in:

effect.self().apply(ijkPoints)

If so, how do we run all the functions in our main class?

Thanks!

1 Like

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

1 Like

@lassoan do you have a solution for this?

FA.nrrd is an example that was used in old templates. Please use the latest module template.

You can use any test data - from Slicer’s sample data sets or anything that you upload into your own repository.

I’ve already described in a different topic how to run apply method of Local threshold effect. If you still have problems with that then please ask there. Provide link to your source code, if you have questions about why your code is not working.

2 posts were merged into an existing topic: Python - Editing Feature Size Local Threshold