|
Since this is purely a Dental application, there is no need in over-complicating things, so it's going to be a 2D visual representation (at least for start )
Regarding my #3: The user (dentist) will have limited options in the designs he/she can do on a tooth (for instance, 1 specific design for a filling, or a big red "X" sign over a tooth designating that the specific tooth is absent on the specific patient). It won't be a free-hand painting or something like that. Therefore, a there is a table in the DB which contains all of the possible designs and each time the doctor alters a tooth, that new (predefined) design will be stores in the patient's table as well.
Hope I've clear things a bit.
Polis
|
|
|
|
|
hmm my understanding is that there already is DB with information like fillings/missing tooth etc. for every tooth. (As you said you want to do visual representation, not to rewrite DB schema ) So you'll take these information from DB and render jaw from information you have there... example: in DB is that user #123 has one missing tooth at position 5 (or something, dunno). So you have somewere bitmaps for tooth OK, tooth with filling, missing tooth etc. ( not for every patient, only once!) and render all of them according to information form DB. After some change (e.g. on visual model you right click and set filling for tooth on position 7) you change this information in DB, like you did without visual representation. Maybe some kind of misunderstanding is going on?
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Yes David, what you are saying is making sense to me. You are right, I got the whole thing wrong in my mind.
So, what you are saying is that I keep a folder with all the possible bitmpaps for each tooth. Then, in the application the doctor selects the bitmap for the specific tooth (e.g. by right-clicking on the tooth) and apply it. Then, this change is saved in the Patients table for the specific patient (e.g. by saving the bitmap filename). Correct?
However, I am still wondering what is the best way for representing the jaw thing on the form. What do u think? A series of bitmaps (1 for each tooth) would be solution that fits the above logic right?
Any ideas on where I can get some resources? e.g. all-ready made bitmaps of a human jaw etc? Cause my research didn't really pay off.
Polis
|
|
|
|
|
Polis Pilavas wrote:
So, what you are saying is that I keep a folder with all the possible bitmpaps for each tooth.
Yes. There are only about 32 * number of "designs" of them so no big deal I think.
Polis Pilavas wrote:
Then, this change is saved in the Patients table for the specific patient (e.g. by saving the bitmap filename). Correct?
Almost correct. I don't like bitmap filename semantics here. You (should) want to represent state of tooth, not picture. In simple model, you'd have table like
- left_upper_filling | left_upper_filling.bmp
- rigth_upper_filling | rigth_upper_filling.bmp
.... something lke that. Point is whan you have table like this is you can change your pictures from bmp to wmf or something only on ONE place in DB. Plus if you take advantage of transparent pictures you can easily blend some images together, e.g. to make tooth with two fillings on different sides or something like that.. I don't know, there is midnight again so I may not be 100%
I still don't know how you want result look like... Something like this[^] ?
Oh wait... do you want to use real pictures of patient's teeth? I doubt it, but it would be ideal way IMO. ( but nobody's gonna pay it nor make photos of patient's teeth on every change, keep it real )
Polis Pilavas wrote:
Any ideas on where I can get some resources? e.g. all-ready made bitmaps of a human jaw etc? Cause my research didn't really pay off.
Google Image search? Mostly copyrighted material I guess, but in general you should find medical/scientific sites and there you may eventually ask them for some material... hard to say.
I don't know how much you want to spent on it or even how much freedom you have, so some of my ideas may sound crazy. But I better write 'em down then forget them.. what if they were useful?
p.s could you post screenshot of your result one day? It would be cool! Or article maybe
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Thanx David, u've been really helpful. I got ur point.
I am gonna figure out what type of images I am going to use and take it from there. I don't really know yet, but most probably (99%) I am gonna apply the technique we talked about tonight.
Yes, I've been thinking of posting an article on this once I finish it. Although it may take a while cause this is a "side" project . I will post one someday though.. hopefully some people might be interested or face similar problem for a different application.
Thanx again David
Regards,
Polis
|
|
|
|
|
If all you're interested in is an idealized representation of an (adult) human jaw, with markings that vary on a per-patient basis, why not use a single image for the jaw, containing all of the teeth in a normal human (adult) jaw?
You could then store only the modification data for each patient, representing each modification as a row of data (e.g. with columns for the modified tooth, the position of the modification, code for what the modification is - filling, bridge, root canal, extraction etc).
That way, when you rendered a patient's jaw graphically, you could just overlay the modifications on top of the jaw (using descriptive glyphs or icons) without having to store an image for each type of modification.
Just another possible direction.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
yeah that's good possibility. Only problem could be to find icons descriptive enough. But, maybe it's not as problematic as find real picures...
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Yes, this sounds interesting as well, however needs much more work to implement than the other direction.
I am gonna figure out what I am gonna do and let u know guys.
Thanx for ur directions.. really interesting
|
|
|
|
|
i told all of you before that i am designing new chat messenger but i really find some great troubles in my application i really want help from anybody knows how to deal with C# networking and its facilities in that type of things.........
>>>> at the server side<<<<<<<
here i created void method to handle the connection of clients upon specific port ...
and i created new thread to handle the connection of multiusers who will connect to the server at any time
and i replaced my thread in the constructor of my main program
as
..............................................
Thread readthread = new thread( new threadstart(runserver));
readthread.start();
...................
and that method in that delegate is like that
...........................................
public void runserver()<br />
{<br />
int counter = 1;<br />
try<br />
{<br />
server = new TcpListener(5151);<br />
server.Start();<br />
do<br />
{<br />
try<br />
{<br />
listBox1.Items.Add("Waiting for connection");<br />
connection = server.AcceptSocket();<br />
socketstream = new NetworkStream(connection);<br />
reader = new BinaryReader(socketstream);<br />
writer = new BinaryWriter(socketstream);<br />
writer.Write("server :" + " Welcome Client");<br />
listBox1.Items.Add("Connection " + counter + " Recieved");<br />
string message ="";<br />
do<br />
{<br />
message = reader.ReadString();<br />
listBox1.Items.Add(message);<br />
<br />
}while(connection.Connected);<br />
}<br />
catch(Exception)<br />
{<br />
break;<br />
}<br />
listBox1.Items.Add("Client Terminated the connection");<br />
connection.Close();<br />
reader.Close();<br />
writer.Close();<br />
socketstream.Close();<br />
++counter;<br />
}while(true);<br />
}<br />
catch(System.Exception caught)<br />
{<br />
MessageBox.Show(caught.Message);<br />
}<br />
}<br />
that worked with me when i started my server application and started my client application . It only accepted one client connection but when i tried to start new client window it didn't accept it and nothing was written on my second client window like the proper message in the previous code ((Writer.write("Server:Welcome Client");)
tell me in god sake how can i make it accept clients not only one client
i will be very thoughtful for any help
thank you your brother
>>>>>Snouto Override<<<<<<
Miss With The Best And Die Like The Rest
|
|
|
|
|
There is one problem in your code. All the code runs on one thread - so you just can handle one connection.
To avoid this effect you should start one thread per client.
At the point where you accept the socket you shoul openn a new thread and give it the socket.
As a result the main thread isn't blocked anymore and can accept new connections.
So it should be possible to handle multiple connections.
|
|
|
|
|
you mean my friend that i will add new thread after the code that accept the socket connection upon client request
you mean my code will be like that
-------------------------------------------------
public void runserver()
{
int counter = 1;
try
{
server = new TcpListener(5151);
server.Start();
//loop until recieveing connection request from the clients
do
{
try
{
//inform at the server side that it is waiting for connection
//from clients
listBox1.Items.Add("Waiting for connection");
//intialize new socket connection upon client request
connection = server.AcceptSocket();
//////////////////////////////////////////////////////
//here what did you told me... you mean like that
Thread Anotherthread = new thread(new threadstart(runserver));
Anotherthread.start();
/////////////////////////////////////////////////////
//intialize new network stream connection
socketstream = new NetworkStream(connection);
//intialize new binary reader and binary writer to the network
reader = new BinaryReader(socketstream);
writer = new BinaryWriter(socketstream);
//inform the user that there was new client connection
writer.Write("server :" + " Welcome Client");
listBox1.Items.Add("Connection " + counter + " Recieved");
string message ="";
do
{
message = reader.ReadString();
listBox1.Items.Add(message);
}while(connection.Connected);
}
catch(Exception)
{
break;
}
listBox1.Items.Add("Client Terminated the connection");
connection.Close();
reader.Close();
writer.Close();
socketstream.Close();
++counter;
}while(true);
}
catch(System.Exception caught)
{
MessageBox.Show(caught.Message);
}
}
Miss With The Best And Die Like The Rest
|
|
|
|
|
I wrote a program that I call GameServer that can be run either in server or client mode (i.e. you would run one instance to fill the role of "server" then you can have multiple "client" instances). The server accepts and identifies the individual clients and even has "chat" windows that are displayed on each client box that get updated from every connected client.
If you would like to see this code I can zip it up and e-mail it to you - just let me know. You could pull the essential elements out of the code and use what you need.
dpb
Darryl Borden
Principal IT Analyst
dborden@eprod.com
|
|
|
|
|
Hi , i am actually beginner with C#, so i have a simple question. I Have a form "Form1.cs" and "Form2.cs" so
when i press button , in "Form1.cs" , i want simply the Form2 dialog to show up.
And one more thing how can i programatically set font
of a textBox ??
Regards
m0n0
m0n0
|
|
|
|
|
1st question:
If you want to show a second window you hav 2 option - show it as dialog or as free window
here a sample to show it as dialog (the easier way):
Form2 f = new Form2();
f.ShowDialog();
2nd question:
you can change the font of a textbox in the following way (this is the visual studio auto generated code if you change it in the designer):
this.textBox1.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
|
|
|
|
Thanks hooray for attention.
Could you help me with one more problem ,
i want to save to text file(*.txt) what textBox contains
Thanks in advance
m0n0
|
|
|
|
|
you just have to open an streamwriter object (in the namespace System.IO) and then write the string to the file.
string str = textBox1.Text;
StreamWriter sw = new StreamWriter(@"1.txt");
sw.Write(str);
sw.Close();
|
|
|
|
|
Thanks!
i guess @ means that the file will be saved there from where the program is launched? and is there smth like @ but the file will be saved in windows folder.(like regedit has
%system%).
And i have problems setting oppacity programatically, i do following
this.Oppacity = 50;
but it does not work , i think it needs smth like Updatedata() ???
Best Regards.
m0n0
|
|
|
|
|
the @ means the special chars like '\' will not be interpreted.
for example:
@"c:\1.txt" == "c:\\1.txt"
(for me - I just getting used to use it as standard)
The Opacity could not be set to the value of 50. The Opacity is a float value - so if you like to reach 50% opacity you should set it to 0.5
|
|
|
|
|
|
hi,
i have a problem with the window_moved event of the internet explorer. i have an IWebBrowserApp object and get the events through a DWebBrowserEvents2_Event interface. i connect the browser object to the events with the following code:
member_WebBrowserEvents2 = member_IWebBrowserApp as SHDocVw.DWebBrowserEvents2_Event;
then i delegate the setLeft event handler to my function with the following code:
member_WebBrowserEvents2.WindowSetLeft += new SHDocVw.DWebBrowserEvents2_WindowSetLeftEventHandler(SetLeftFunction);
this doesn't work . all other events like e.g. TitleChange or OnQuit work. i need the event when the user moves or resizes the browser window. the WindowMove event listener of the SHDocVw.DWebBrowserEvents_Event interface doesn't work too. does anyone has a solution for this problem?
thanks for help
|
|
|
|
|
I have just completed a big C# project and have descoverd that i have to create a variable list, i was wondering if there is a way of automatically creating this in visual studio. or do i have to go through each line to manualy create it?
any help?
|
|
|
|
|
|
A list of the variable names for strings, int, char and arrays. it also can have object names like memory streams and networkstreams.
i hope thats cleard it up a bit
|
|
|
|
|
I don't think there's something like this in VS (well, intellisense and the member dropdowns use this info, but I don't think you can export it).
But using reflection you can build this functionality on your own.
Regards,
mav
|
|
|
|
|
hi
if i have the yaw,pitch,roll angels and the legnth of an obect (line for example) which is drawen for example from point 0,0,0 how can i calculate the coordinates of the end of line point (x,y,z)
thanks for help
|
|
|
|