Hi Michael,

I upgraded to MTC3.0 and tried to run MicronTracker and ended up in some 
problems myself. I filed a bug (http://bugs.mitk.org/show_bug.cgi?id=3860) 
where you can track the progress concerning MTC 3.0. We try to fix this problem 
as soon as possible.

Alex


Von: Michael Kirches [mailto:[email protected]]
Gesendet: Dienstag, 27. April 2010 15:26
An: Seitel Alexander
Cc: [email protected]
Betreff: Re: [mitk-users] Problem initializing MicronTracker

Hi Alex,

I use current SVN version of MITK (should be 0.15) and MTC 3.0. With this 
message I send you the file I made my test with.
I did not mention before that I tested with a debug version of my plug-in and 
of mitk. Could that cause any problems?

Best,
Michael
2010/4/27 Seitel Alexander 
<[email protected]<mailto:[email protected]>>
Hi Michael,

that sounds strange. I guess it could be some problem with the version of the 
API. Currently, MITK supports MTC 2.6 (dated 08/2006). Could you:

-          Check which API version you are using?

-          Send us one of your toolfiles that we can try it here on our system?

-          Tell us which version of MITK you are using (the 0.14 release or the 
current svn version)?
I’ll then check here what causes the problem and will get back to you soon.

Regards
Alex

Von: Michael Kirches 
[mailto:[email protected]<mailto:[email protected]>]
Gesendet: Dienstag, 27. April 2010 13:48
An: Seitel Alexander
Cc: [email protected]<mailto:[email protected]>
Betreff: Re: [mitk-users] Problem initializing MicronTracker

Hi Alex, dear list,

I did again some testing. Original software by Claron Technology correctly 
identifies the tool I want to use for testing my plug-in. Correctly means, when 
I start the delivered demo application and enable marker processing mode, the 
software recognizes the marker and displays the corresponding name. Next thing 
I tried is using MicronTracker with the IGT example as Alex recommended. 
Selecting the toolfile for the recognized marker caused IGT example to hang up 
caused by "Grab frame time out" messages.

So far I got the following facts:

1. There is no hardware problem
2. My toolfile is correct
3. My m_Source member shows added tools when debugging
4. IGT example functionality and my own plug-in crash with same messages.

Where could be the problem?

Regards

Michael
2010/4/27 Seitel Alexander 
<[email protected]<mailto:[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]<mailto:[email protected]>]
Gesendet: Dienstag, 27. April 2010 11:25
An: [email protected]<mailto:[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



--
Michael Kirches
------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to