Monday 7/22
Today I made some design decisions, so that the applet will look fairly nice, and fixed some package/protection/inheritance things.
Here are the buttons it will have:
------
Add
Remove
Highlight (toggles to "Unhighlight")
Center
(In) (Out)
(Cl) (CCl)
(Right) (Left)
(Up) (Down)
------
The ones in parenthesis will have images from Elizabeth's program, and the others are just text at the moment. The first four exist so far.
Problems:
- The display of add/remove/highlight operations doesn't always happen. I'm pretty sure the operation itself is happening, but for some reason we're not seeing the results. It might have something to do with what I'm naming the images- need a better scheme for that anyway. Do they need to have distinct names, or does it not matter at all?
- The hierarchy list needs more choices, but I'm still not sure which ones work when.
Choices:
- I'm really not sure there's any difference between 'hide' and 'dissect' in the DSG, so I just combined the functions into one and called it 'Remove'. That makes more sense anyway.
- I figured we don't need a 'New' when you can just use 'Add'.
To do:
- Figure out about the image names and see if that's affecting the display problem.
- If that's not it, figure out what is.
- Ask about the hierarchies- what works when- and try to make some sort of decision there.
- Make more buttons.
Tuesday 7/23
The display problem was in fact because of the image names. They needed to have distinct names, which they now do thanks to the random number generator. I could wish for a way to delete old images from the results directory automatically, though.
Only the part-of hierarchy works in the DSG at the moment, so I'll leave that as the only choice in the applet for now. It'll be very easy to put in others- just a matter of adding terms to the Choice object in the pop-up frame.
All of the buttons work now, as far as I know. I fixed some things, like unhighlighting the whole thing when you remove a highlighted structure, and only accepting degrees between 0 and 360. I also messed around with the button images so they LOOK more like what they DO.
It uses a little bit of Swing- the JButtons, so that some of them can have images on them. Only some of the things in if_termserv are deprecated, and I don't think I should touch that.
Ideas:
- Handle mouse clicks: show structure name below picture? offer to show a parts list?
- Save- image or scene?
- Support operations on multiple structures
-> how to deal with hierarchies?
- Maintain a list of structures in the scene?
-> if so, store associated hierarchy and be able to select several for operations?
-> so only ask for hierarchy once, when added, and use saved value for other operations?
To do:
- Handle bad entries.
- non integer rotation entry
- adding non-existent term
- removing or highlighting a structure that isn't in the scene
- doing anything except add to a blank scene
- Get Professor Shapiro and Jim to see it, get their input, and ask about ideas.
Wednesday 7/24
I think I've handled all the bad entry possibilities, although you never do know. While I'm waiting to hear input and criticism, I'll just work on the other ideas.
Thursday 7/25
Mouse clicks now show a part name under the image. Structures and hierarchies are stored in an array, so the information can be used for automatic operations. I also fixed a bug that let you add something more than once.
The problem with the mouse clicks is that they show PART names, but not necessarily STRUCTURE names. For example, it will say "esophagus" if you click on any part of the esophagus structure, but it will give you "descending aorta" and "ascending thoracic aorta", among other things, depending on where you click on the aorta structure. This wouldn't really be a problem in itself, but you want (ideally) to be able to perform operations on the selected thing. Operations can only be performed on the structures, I think, and not the parts. But that could be wrong- I don't know yet.
What we'd like to be able to do:
- click on a thing, see its name, and see buttons to highlight and remove it.
- click a button to see a list of things, and be able to select one to highlight or some to remove.
There's also an apparently new problem, which is that it suddenly lets me add some strange things like "stomach" and "rib" that don't appear. It won't let me add just any strange thing; just a few. And I think I remember stomach not working before, at least. And now it won't let me add "rib" any more, so it's definitely not consistent. Maybe it has something to do with what the skandha call returns? If you ask for a real part that just doesn't have a picture, maybe it does something different from when you ask for nonsense? That doesn't explain the inconsistency, of course, but it's something to check.
To do:
- Figure out if there's a difference between the name it displays here and in the DSG. I may have left out a skandha call.
- Find some happy way of combining the part selection and the structure list to do automatic operations that make sense.
- Figure out why it's letting me add weird things and make it stop.
Friday 7/26
Idea: the highlight and remove buttons should pop up lists of things that you could highlight or remove, so you can select one (for highlight) or several (for remove). And you should still be able to select something with a click and highlight (if nothing else is lit) or remove it.
Here's what's happening (I think). The result string sent back by the add/remove/highlight functions is:
- the name of the structure if it's a real thing that was called for the first time.
- cache/operationstructure_str if it's a real thing called after that
- the name of the structure if it's not a real thing.
So we can't tell the difference between 1 and 3 from the result string. I can take care of this for highlight/remove by letting you operate on only listed or selected things. Can't seem to find a way to make sure you don't add nonexistent stuff.
To do:
- Get the highlight and remove lists working with just the added structures.
- Get operations on selected parts working.