<br>Hi Torleif,<br><br>Thanks for sending the files.<br><br>I had trouble compiling the code under Linux with gcc4.1, <br><br>so I made a couple of changes to get it to compile. It seems<br>that your declarations of event types were inconsistent.
<br><br>The "using" statements were also removed, since as we explained<br>before, they do not fit the coding style of IGSTK.<br><br>I also replaced the hard-coded name of the DICOM dataset with<br>one that you can set from the command line arguments, and
<br>added two tests that to the CMakeLists.txt file so that you can<br>run them with CTest. Note that one of the tests requires you <br>to specify the IGSTK_SOURCE_DIR so that it can take a DICOM <br>dataset out of the Testing/Data directory.
<br><br>When I run the tests, I don't encounter the error that you reported.<br>so I'm wondering if something platform specific is going on here...<br><br>Please find attached the .tgz file the code of the volumemanager
<br>that includes my modifications.<br><br>Could you please give it a try to this modified code and let us know<br>if you still encounter the same problem ?<br><br>If the problem persists we will need more information about the specific
<br>details of your platform and the versions of the software that you are using.<br><br><br> Thanks<br><br><br> Luis<br><br><br><br>----------------------------------------------------------------------------------
<br><div><span class="gmail_quote">On 6/20/07, <b class="gmail_sendername">Torleif Sandnes</b> <<a href="mailto:Torleif.Sandnes@sintef.no">Torleif.Sandnes@sintef.no</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Louis.<br>Thanks for your reply!<br><br>Not using the singleton pattern and instantiating a volumemanager<br>with VolumeManager::New(), the problem goes away.<br>I have put together a mininal application that reproduces the problem
<br>with singleton pattern/DICOM image loading and attached it with this<br>email.<br>In the attached example, the VolumeManager is not in a library, but<br>the problem is still present.<br><br>Please set the constant TestVolumeManager::DICOMSERIES_PATH to a
<br>suitable DICOM MR image.<br><br>> 1) Why are you using a Singleton for the volume Manager ?<br><br>There should never be more than one volume manager in my application.<br><br>> 2) Are you creating a shared library with this class ?
<br><br>No, the class is in a static library. Also, linking the volumemanager<br>directly with the executable, the problem is still present.<br>(As in the attached example)<br><br>><br>> 3) Can you please send the actual source files and
<br>> test files ? something we could compile and run<br>> in order to reproduce the problem.<br>><br>> In the code snippets that you sent we can't find<br>> the declaration of "imageSpatialObject_"... for
<br>> example<br><br>See the attached files.<br><br>> BTW: Please don't do:<br>><br>> using std::vector;<br>> using std::string;<br>><br>><br>> This is equivalent to opening the namespace for these
<br>> symbols. Instead of doing this, you should always use<br>> the std:: namespace specifier.<br><br>Well, I agree that the "using" directive shouldn't be used in header<br>files and thus pollute every file that includes that header file.
<br>I can also agree that putting "using" directives on the top of<br>implementation, (cpp/cxx), files can be bad, but IMHO it is okay in<br>more limited scopes to avoid writing the namespace prefix over and<br>
over again.<br><br>Regards,<br>Torleif Sandnes<br>Sintef Health Resarch<br><br></blockquote></div><br>