<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<BR> Thank you Ziv,<BR>
<BR>
I got another problem with the definition file (.rom file), after I used command PINIT to initialize the port handle, polaris spectra returned ERORR40 (file format is invalid or CRC failed).<BR>
But the return of command:PVWR is all okay. I am compused about it now, in order to make sure the file is right, I read the file out and wrote a test program by manually using PVWR assign the definition file one address by one address. But it is still not working. would you please give me some suggestion?<BR>any help is very much appreciated,<BR>
<BR>
<BR>
Below is part of the test program(the rom flie is 8700339.rom which is provided by NDI):<BR>write(fd,"PHRQ *********1****",20);<BR>
got handle 01;<BR>then assign the file with 16 addresses<BR>write(fd, "PVWR 0100004E444900D2110000010000000000000100000000031480345A00000004000000040000000000403F000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 01004000002041000000000000000000000000000000000000000052B8E4417B14244200000000000000000000B04200000000AE4731C2CDCC21420000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 01008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 0100C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 01010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000803F00000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 010140000000000000803F00000000000000000000803F00000000000000000000803F0000000000000000000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 01018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 0101C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 0102000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001F1F1F1F\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 010240090000004E4449000000000000000000383730303333390000000000000000000000000009010101010000000000000000000000000000000001010101000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 010280000000000000000000000000008000290000000000000000000080BF000000000000000000000000000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 0102C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 01030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 01034000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd, "PVWR 01038000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r", 140); <BR>usleep(1000000);<BR>write(fd, "PVWR 0103C000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000\r", 140);<BR>usleep(1000000);<BR>write(fd,"PINIT 01",9);<BR>
error40...<BR>
<BR>
<BR>
regards,<BR>
<BR>
Jason<BR>
<BR>
<BR>> Date: Mon, 30 Mar 2009 09:45:34 -0400<BR>> From: zivy@isis.imac.georgetown.edu<BR>> To: famousyi@hotmail.com<BR>> CC: igstk-users@public.kitware.com<BR>> Subject: Re: [IGSTK-Users] Polaris reference tool<BR>> <BR>> Dear Jason YEE,<BR>> <BR>> To set a tool as a dynamic reference you first initialize the tool as<BR>> you would with all tools then attach it to the tracker and finally set<BR>> it as a dynamic reference.<BR>> <BR>> pseudo code:<BR>> <BR>> Tracker;<BR>> Tool;<BR>> <BR>> Create and initialize tracker;<BR>> Create and initialize Tool;<BR>> <BR>> Tool->RequestAttachToTracker(Tracker);<BR>> Tracker->RequestSetReferenceTool(Tool);<BR>> <BR>> <BR>> Once you start tracking the reported transformation will be relative to<BR>> the reference frame.<BR>> <BR>> <BR>> If you are looking for generic code that works with all IGSTK supported<BR>> trackers please take a look at the TrackerController class and the<BR>> tracker configuration and xml file readers. These allow you to specify<BR>> the tool configuration in an xml file and you don't have to write the<BR>> initialization and setup code as described above. A good example of<BR>> using this framework is the Navigator application.<BR>> <BR>> regards<BR>> Ziv<BR>> <BR>> <BR>> Jason YEE wrote:<BR>> > greetings,<BR>> > <BR>> > I am encountering a problem with the reference port handle of the <BR>> > polaris currently, I seek your help:<BR>> > <BR>> > There is no API command for setting the reference port handle (Is it <BR>> > right?), so how the position sensor know which tool has been set to be <BR>> > the reference? <BR>> > <BR>> > Could you please tell me a method for setting the reference and getting <BR>> > transform with respect to reference?<BR>> > <BR>> > Any help is very much appreciated,<BR>> > <BR>> > Regards,<BR>> > <BR>> > Jason<BR>> > ------------------------------------------------------------------------<BR>> > See all the ways you can stay connected to friends and family <BR>> > <http://www.microsoft.com/windows/windowslive/default.aspx><BR>> > <BR>> > <BR>> > ------------------------------------------------------------------------<BR>> > <BR>> > _______________________________________________<BR>> > Powered by www.kitware.com<BR>> > <BR>> > Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<BR>> > <BR>> > Follow this link to subscribe/unsubscribe:<BR>> > http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-users<BR>> <BR>> <BR>> -- <BR>> Ziv Yaniv, PhD., Research Assistant Professor<BR>> Imaging Science and Information Systems (ISIS) Center<BR>> Department of Radiology<BR>> Georgetown University Medical Center<BR>> 2115 Wisconsin Avenue, Suite 603<BR>> Washington, DC, 20007,<BR>> <BR>> Phone: +1-202-687-7286<BR>> Fax: +1-202-784-3479<BR>> email: zivy@isis.georgetown.edu<BR>> web: http://isiswiki.georgetown.edu/zivy/<BR><br /><hr />Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! <a href='http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us' target='_new'>Try it!</a></body>
</html>