Hi Alex thanks for your quick answer.
I got some results. 1. There is no hardware problem. The MicronTracker perfectly works together with the software delivered by the manufacturer. 2. I got several toolfiles. ITG example produces Grab frame time out messages, just like my own code (I tried all the files I got available) 3. As far as I know the files were generated using Claron Software, so I suppose they are correct. 4. Debugging my m_Source shows the tracking device with added tools. Points 2 and 3 may be contradictory, so I will try to catch the person who generated the files and create a new one. I'll let you know if there are further problems. Thanks so far Regards, Michael 2010/4/27 Seitel Alexander <[email protected]> > Hi Michael, > > > > I quickly scanned over your code but couldn’t find an obvious error. I > would recommend you try the following to find the problem: > > > > 1. Try if the MicronTracker works with the software delivered by the > manufacturer (This ensures, that there is no hardware problem) > > 2. Try to use the MicronTracker with your toolfile with the IGT > example functionality which you can find in the open source checkout of mitk > > > 3. Check if you add the correct toolfile and if it is written > correctly > > 4. Debug your m_Source member and check if there are tools added to > the corresponding tracker before calling Connect() > > > > That should give us a clue where to find your problem. > > Just tell us if there are further problems. > > > > Regards, > > Alex > > > > *Von:* Michael Kirches [mailto:[email protected]] > *Gesendet:* Dienstag, 27. April 2010 11:25 > *An:* [email protected] > *Betreff:* [mitk-users] Problem initializing MicronTracker > > > > Hi all, > > currently I'm involved in developing a MITK plug-in that uses MicronTracker > 3 to track movements of certain tools. So far I created a small GUI to set > up the tracking system step by step, so you can select the tracking device, > add tools and connect to the tracking system. However when I try to connect > after having added at least one tool, mbilog console shows error messages > like "Loaded 0 marker templates" and "MTC error: Grab frame time out". Below > I posted a little bit of code, so you can get an idea of what I've done. It > there any error in it? Or am I missing some facts? > > (Explanation of how I want my GUI to work: First you select your tracking > device from a list (QComboBox) (calls method "SelectTrackingSystem(QString > name)), second you add tools by typing a name in a textfield, selecting a > tool calibration file from a QFileDialog and clicking on a button "Add > tool". This will call method AddTool(). When you added enough tools, method > ConnectTrackingSystem() will be called (again by clicking on a button). Now > this is the very point where the log messages appear) > > // > // Tracking System related methods > // > void QmitkMITKUltraSoundCalibrationPluginView::GetCalibrationFile() > { > m_Controls->edCalibFile->setEnabled(true); > QString fileName = QFileDialog::getOpenFileName(m_Parent, "Select a > calibration file","C:\\Programme\\Claron > Technology\\MicronTracker\\Markers","All files(*.*)"); > m_Controls->edCalibFile->setText(fileName); > m_Controls->edCalibFile->setEnabled(false); > } > > void QmitkMITKUltraSoundCalibrationPluginView::SelectTrackingSystem(QString > name) > { > // if m_Source has already been instantiated, close open connections > if(m_Source.IsNotNull()){ > if(m_Source->IsConnected()){ > m_Source->Disconnect(); > } > } > > // clean up resources of m_Source and tracker > m_Source = NULL; > tracker = NULL; > > switch(m_arTrackingSystems.indexOf(name)){ > case 1: > { > // tracker must be set up completly (including tools) > before adding it to m_Source. > // Therefore m_Source will only be instantiated by calling > ConnectTrackingSystem() > // next time. > tracker = mitk::ClaronTrackingDevice::New(); > break; > } > case 2: > { > // include your tracking system here > break; > } > default: > break; > } > } > > void QmitkMITKUltraSoundCalibrationPluginView::AddTrackingTool() > { > if (tracker.IsNull()) > tracker = mitk::ClaronTrackingDevice::New(); > > QString toolName = m_Controls->edToolName->text(); > QString toolCalibFile = m_Controls->edCalibFile->text(); > mitk::TrackingTool* t = tracker->AddTool(toolName.toLatin1(), > toolCalibFile.toLatin1()); > if (t == NULL) > { > m_Controls->lblConnectionState->setText("Could not add tool > "+toolName); > } > else > { > m_Controls->lblConnectionState->setText("Tool '"+toolName+"' > added."); > } > } > > void QmitkMITKUltraSoundCalibrationPluginView::ConnectTrackingSystem() > { > if (m_Source.IsNull()) > { > m_Source = mitk::TrackingDeviceSource::New(); > if(tracker.IsNotNull()) > m_Source->SetTrackingDevice(tracker); > else { > m_Controls->lblConnectionState->setText("ERROR! Tracker not > initialized."); > m_Source = NULL; > return; > } > m_Source->Connect(); > if (m_Source->IsConnected()) > { > if (m_Source->GetTrackingDevice()->GetState() == > mitk::TrackingDevice::Ready) > m_Controls->lblConnectionState->setText("MicronTracker is > connected and ready."); > else if (m_Source->GetTrackingDevice()->GetState() == > mitk::TrackingDevice::Tracking) > m_Controls->lblConnectionState->setText("MicronTracker is > connected and tracking."); > else if (m_Source->GetTrackingDevice()->GetState() == > mitk::TrackingDevice::Setup) > m_Controls->lblConnectionState->setText("MicronTracker is > connected but not ready."); > else > m_Controls->lblConnectionState->setText("MicronTracker is > connected (unknown state)."); > } > else{ > m_Controls->lblConnectionState->setText("MicronTracker is not > connected."); > } > } > else{ > m_Controls->lblConnectionState->setText("ERROR! > TrackingDeviceSource is stil alive!"); > } > } > > void QmitkMITKUltraSoundCalibrationPluginView::DisconnectTrackingSystem() > { > if(m_Source.IsNotNull()){ > m_Source->Disconnect(); > if (m_Source->IsConnected()) > { > m_Controls->lblConnectionState->setText("ERROR! MicronTracker > is still connected."); > return; > } > else{ > m_Controls->lblConnectionState->setText("MicronTracker is not > connected."); > m_Source = NULL; > tracker = NULL; > } > } else { > m_Controls->lblConnectionState->setText("ERROR! > TrackingDeviceSource is not alive!"); > } > } > > -- > Michael Kirches > -- Michael Kirches
------------------------------------------------------------------------------
_______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
