MCPcopy Create free account
hub / github.com/MITK/MITK / Load

Method Load

Examples/Tutorial/Step6/Step6.cpp:113–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void Step6::Load(int argc, char *argv[])
114{
115 //*************************************************************************
116 // Part I: Basic initialization
117 //*************************************************************************
118
119 m_DataStorage = mitk::StandaloneDataStorage::New();
120
121 //*************************************************************************
122 // Part II: Create some data by reading files
123 //*************************************************************************
124 int i;
125 for (i = 1; i < argc; ++i)
126 {
127 // For testing
128 if (strcmp(argv[i], "-testing") == 0)
129 continue;
130
131 // Load datanode (eg. many image formats, surface formats, etc.)
132 mitk::StandaloneDataStorage::SetOfObjects::Pointer dataNodes = mitk::IOUtil::Load(argv[i], *m_DataStorage);
133
134 if (dataNodes->empty())
135 {
136 fprintf(stderr, "Could not open file %s \n\n", argv[i]);
137 exit(2);
138 }
139
140 mitk::Image::Pointer image = dynamic_cast<mitk::Image *>(dataNodes->at(0)->GetData());
141 if ((m_FirstImage.IsNull()) && (image.IsNotNull()))
142 m_FirstImage = image;
143 }
144}
145
146void Step6::SetupWidgets()
147{

Callers

nothing calls this directly

Calls 7

LoadFunction · 0.85
atMethod · 0.80
IsNotNullMethod · 0.80
NewFunction · 0.50
emptyMethod · 0.45
GetDataMethod · 0.45
IsNullMethod · 0.45

Tested by

no test coverage detected