27 #include <itksys/SystemTools.hxx>
57 std::cout <<
"Generating TrackingDevice ..." << std::endl;
60 tracker->AddTool(
"tool1");
61 tracker->AddTool(
"tool2");
76 std::cout <<
"Generating Source ..." << std::endl;
79 source->SetTrackingDevice(tracker);
83 source->StartTracking();
97 std::cout <<
"Generating DisplacementFilter ..." << std::endl;
102 displacer->SetOffset(offset);
106 displacer->ConnectTo(source.GetPointer());
126 std::cout <<
"Start Recording ..." << std::endl;
132 filename << itksys::SystemTools::GetCurrentWorkingDirectory() <<
"/Test Output-0.xml";
134 std::cout <<
"Record to file: " << filename.str() <<
" ..." << std::endl;
139 recorder->ConnectTo(displacer);
141 recorder->StartRecording();
145 for (
unsigned int x = 0; x < 100; x++)
149 itksys::SystemTools::Delay(100);
151 recorder->StopRecording();
172 std::cout <<
"Start playing from file: " << filename.str() <<
" ..." << std::endl;
177 player->SetNavigationDataSet(naviDataSet);
185 for (
unsigned int x = 0; x < 100; x++)
190 player->GoToNextSnapshot();
193 MITK_INFO <<
"Tool 1:" << nd->GetPosition();
194 MITK_INFO <<
"Tool 2:" << nd2->GetPosition();
196 itksys::SystemTools::Delay(100);
200 itksys::SystemTools::Delay(2000);
201 std::cout <<
"finished" << std::endl;
int main(int, char *[])
A small console tutorial about MITK-IGT.
itk::SmartPointer< Self > Pointer
static mitk::BaseData::Pointer LoadBaseData(const std::string &path)
Create a BaseData object from the given file.
void FillVector3D(Tout &out, mitk::ScalarType x, mitk::ScalarType y, mitk::ScalarType z)
static bool SaveBaseData(mitk::BaseData *data, const std::string &path)
SaveBaseData Convenience method to save arbitrary baseData.
static const std::string filename
Data structure which stores streams of mitk::NavigationData for multiple tools.