Open CheerfulMinions opened 1 year ago
You shouldn't be worrying about reading images since it should be done by the snap IO logic. Please see this line and the file for how to use image data loaded by snap.
Any UI feature should be done in the "Application-Model-UI" framework. In your case, the image should already be loaded to the Application
layer. And your backend logic should be created in the Model
layer, providing API's for the UI
layer to complete tasks.
Your Model
layer is responsible to reference the Application
layer object IRISApplication
to retrieve loaded data and complete tasks, and present the result by pushing it back to the application.
First of all, thank you very much for your last reply!
I've been trying to add region-grow for a while now, but I'm having a bit of a problem. As you can see, in my code below, I was forced to load the image file by reading the file name. Of course, I tried to map the file by using the GuidedNativeImageIO pointer, and then using CastNativeImage as a CurvatureFlowImageFilter input. But this can only be used when reading the main image. When the main image is loaded, the IO pointer is removed... I wouldn't be able to use it as a CurvatureFlowImageFilter input. I read the relevant source code, but I don't know how to transform m_mainImageWrapper CurvatureFlowImageFilterType: : Pointer input at the same time how to shows on the screen? Do I need to convert the data format? I am looking forward to your reply.
Here is my complete code: