Dear List,
I work with Stefan Dänzer at ICCAS-Leipzig on an Ultrasound-Project.
Recently I used the OpenCV-Modul to capture pictures (Ultrasound-Images) from a
Frame-Grabber. It all works fine, but the OpenCVToMitkImageFilter slows down
the hole grabbing-routine. Probably, I'm going to use threads with mutex in
addition to parallelize the reading and writing from a queue. There is almost a
linking-error when I use the BOOST-Library. Can I use threads (i.e. BOOST) in
MITK and is there a possibility to fasten the grabbing-routine?
Source-Code:
if(m_CurrentCVFrame = m_GrabVideo->GetCurrentFrame())
{
m_Filter = mitk::OpenCVToMitkImageFilter::New();
m_Filter->SetOpenCVImage(m_CurrentCVFrame);
m_Filter->Update();
m_CurrentMITKFrame = m_Filter->GetOutput(0); // here the program slows
down
if(!m_Node){
m_Node = mitk::DataNode::New();
m_Node->SetName("grabbedVideo");
m_Node->SetData(m_CurrentMITKFrame);
m_Ds->Add(m_Node);
mitk::RenderingManager::GetInstance()->InitializeViews(m_Ds->ComputeBoundingGeometry3D(m_Ds->GetAll()));
}else {
m_Ds->GetNamedNode(m_Node->GetName())->SetData(m_CurrentMITKFrame);
}
cvShowImage("video", m_CurrentCVFrame); //display the current frame
} else {
CloseVideoGrabber();
cout << "Capturing finished!" << endl;
}
By the way, is the mitk::Image the right object to save the ultrasound-images
as time-sliced data to build a 3D-Volume?
Best regards
Matthias Mucha
--
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users