Skip to content

Commit

Permalink
more documentation polishing + code polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
aabadie committed Oct 10, 2015
1 parent 4ca8c66 commit 0c90bc0
Show file tree
Hide file tree
Showing 9 changed files with 350 additions and 325 deletions.
2 changes: 1 addition & 1 deletion documentation/footer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


<div style="text-align:right;padding:10px;">
Copyright University of Rennes I, 2011
Copyright INRIA, 2015
</div>

</body>
Expand Down
47 changes: 24 additions & 23 deletions documentation/integrationpage.h
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
/**
* \page integrationpage Integrating QtDcm in a Qt application
*
* The integration of QtDcm in a Qt application is very easy but you have to know how to configure the QtDcmManager class. This
* class manage the connections between widgets, dicom communication classes and conversion classes (or command line tools).
* The integration of QtDcm in a Qt application is very easy but you have to know how to configure it via QtDcmManager which is in charge of the
* connections between the different widgets, dicom communications, dicom images downloads and image conversions (or command line tools).
*
* Important note: for the moment, QtDcm can only be integrated in Qt based applications and more precisely QtWidgets based applications.
*
* \section basic_section Instanciating the objects
*
* In your application you have to first instanciate the widgets. Here we only show the case with the main QtDcm and the
* QtDcmImportWidget.
* QtDcmImportWidget, assuming "this" is the parent widget embedding those widgets.
* \code
* QtDcm * mainWidget = new QtDcm;
* QtDcmImportWidget * importWidget = new QtDcmImportWidget;
* QtDcm * mainWidget = new QtDcm(this);
* QtDcmImportWidget * importWidget = new QtDcmImportWidget(this);
* \endcode
*
* Then you have to set the setting file. This file is stored in your personnal directory and if it doesn't exist it's created with
Expand All @@ -19,8 +21,7 @@
* QtDcmPreferences::instance()->setIniFile("mySettings");
* \endcode
*
* Then you have to give the QtDcmManager class (note that this is a singleton) the pointers to the previous widgets. QtDcmManager
* should always be called using the QtDcmManager::instance() method. When setting the widgets, all the connexions are perfomed
* Set the QtDcmManager class the pointers to the main widgets (QtDcm, QtDcmImportWidget for example). All the connexions are perfomed
* internally by QtDcmManager.
*
* \code
Expand All @@ -32,8 +33,8 @@
*
* Depending on what you planned to do with this library, it's possible to set behaviour options to QtDcmManger. This behaviour mostly relies on
* the way dicom data are converted and where they are stored.
* First there's a mode that you can set if you want to control in the code where the converted data are stored. See QtDcmManager::outputdirmode enum.
* If you choose QtDcmManager::DIALOG, the output directory will be set using a QFileDialog. If you choose QtDcmManager::CUSTOM, you will also have
* First there's a mode that you can set if you want to control from the code where the converted data will be stored. See QtDcmManager::outputdirmode enum.
* If you choose QtDcmManager::DIALOG, the output directory will be set using a QFileDialog. If you choose QtDcmManager::CUSTOM, you will have
* to set manually the output directory.
* \code
* QtDcmManager::instance()->setOutputdirMode(QtDcmManager::CUSTOM);
Expand All @@ -43,13 +44,13 @@
* QtDcmManager::instance()->importSelectedSeries();
* \endcode
*
* The other useful option is the choice between using the provided converter (call to dcm2nii binary or ITK based conversion class).
* The other option is the choice of the provided converter : using a call to dcm2nii binary or using an ITK based conversion class.
* \code
* QtDcmManager::instance()->useConverter(true);
* QtDcmManager::instance()->setExternalUseConverter(true);
* ...
* or
* ...
* QtDcmManager::instance()->useConverter(false);
* QtDcmManager::instance()->setExternalUseConverter(false);
* \endcode
*
*
Expand All @@ -60,35 +61,35 @@
* \subsection easy_settings_subsec The easiest way: calling the QtDcmPreferencesDialog class
* You just need to call the slot QtDcm::editPreferences()
* \code
* QtDcm * main = new QtDcm;
* QtDcm * main = new QtDcm(this);
* main->editPreferences();
* \endcode
*
*
* \subsection embed_settings_subsec Used the specific settings widgets
*
* Theses widgets are designed to be integrate in large applications, in fact you can just add where you want. First you need to instanciate
* them and to give them he pointer to the instance of QtDcmPreferences.
* These widgets are designed to be integrated in other applications/widgets, in fact you can just use them where you want, assuming the parent class is QWidget based.
* You just need to instanciate them and they will internally update the QtDcmPreferences instance but the changes won't be written to the settings file.
* \code
* QtDcmServersDicomSettingsWidget * servers = new QtDcmServersDicomSettingsWidget;
* servers->setPreferences(QtDcmPreferences::instance());
* p_servers = new QtDcmServersDicomSettingsWidget(this); // assuming p_servers is a member of the parent widget
* \endcode
*
* In this way it's necessary to add somewhere in your application a way to store the settings. For example a "Save" button. The clicked()
* signal of this button will be connected with a onSaveClicked() slot that will be in charge to update the settings.
* In this way it's necessary to add somewhere in your application a way to store the settings, e.g a "Save" button connected to an onSaveClicked() slot.
* Here is the instanciation of the button and the signal/slot connection.
* \code
* //instanciate a QPushButton
* QPushButton * save = new QPushButton;
* QObject::connect(save, SIGNAL(clicked), this, SLOT(onSaveClicked()));
* QPushButton * save = new QPushButton(this);
* connect(save, &QPushButton::clicked,
* this, &MyParentWidget::onSaveClicked);
* \endcode
*
* Here is the slot implementation:
* \code
* void MyClass::onSaveClicked()
* {
* this->servers->updatePreferences(); //"This" is a bit tricky but this is just an example...
* m_servers->updatePreferences(); // Updates preferences in memory
* QtDcmPreferences::instance()->writeSettings(); // Effectively writes them to the settings file
* }
* \endcode
*
*/
*/
63 changes: 35 additions & 28 deletions documentation/step2.h
Original file line number Diff line number Diff line change
@@ -1,54 +1,61 @@
/**
* \page step2page Configuration
*
* The project has to be configured using CMake, see the <a href="http://www.cmake.org">CMake website</a> for more information.
*
* \section supported_builds_sec Supported builds system
*
* QtDcm can be built and run on the following systems:
* * GCC or CLang on Linux (Ubuntu, CentOS have been tested)
* * VisualStudio 2013 (2010 and 2012 should work but were not tested)
* * MacOS X
*
* \section dep_sec The dependencies
*
* \subsection cmake_dep_sec CMake
*
* Install <a href="http://qt.io">CMake</a><br> and choose the installer corresponding to your system. The minimum version required is 3.1 so on certain Linux
* it might not be availble, thus you'll have to build it on your own.
*
* \subsection qt_dep_sec Qt
*
* You can get the Qt development kit from <a href="http://qt.nokia.com/downloads/">the Qt website</a><br>
* On Ubuntu you can simply use the package manager: <a href="apt://libqt4-dev">libqt4-dev</a>
* <div id="code">
* $ sudo apt-get install libqt4-dev
* </div>
* You can get the Qt development kit from <a href="http://qt.io">the Qt website</a><br>
* Take the development kit corresponding to your system and at least install Qt 5.5.
*
* \subsection dcmtk_dep_sec DCMTK
*
* Download the source code from the <a href="ftp://dicom.offis.de/pub/dicom/offis/software/dcmtk/dcmtk360/dcmtk-3.6.0.tar.gz">OFFIS website</a>
*
* On Linux, configure the code, compile and install using the following commands (from the source directory):
* Use the following CMake options values:
* <div id="code">
* $ CFLAGS="-fPIC" CXXFLAGS="-fPIC" AR="gcc" ARFLAGS="-shared -o" LIBEXT="so" RANLIB=":" ./configure -disable-threads --without-openssl --without-libtiff --without-libpng<br>
* $ make && sudo make install-all
* BUILD_SHARED_LIBS: OFF
* CMAKE_BUILD_TYPE: RelWithDebInfo
* </div>
*
*
* \subsection itk_dep_sec The Insight Toolkit
*
* Download the 3.20 version of the Insight Toolkit from <a href="http://voxel.dl.sourceforge.net/sourceforge/itk/InsightToolkit-3.20.0.tar.gz">here</a>.
*
* Download the 4.6 version of the Insight Toolkit from <a href="http://voxel.dl.sourceforge.net/sourceforge/itk/InsightToolkit-4.6.0.tar.gz">here</a>.
* Use the following CMake options values:
* <div id="code">
* BUILD_EXAMPLES: OFF
* BUILD_SHARED_LIBS: ON
* BUILD_TESTING: OFF
* CMAKE_BUILD_TYPE: RelWithDebInfo
* </div>
*
* \section config_sec Configuring QtDcm with CMake
* Make sure to have CMake 2.8.5 minimum and then go to your local QtDcm source directory. We will perform an "out of source" build, so you have to create
* a "build" directory and launch cmake from this place:
* Make sure to have CMake 3.1 minimum and then go to your local QtDcm source directory. I recommend to configure an "out of source" build, so create
* a "build" directory and launch cmake from there:
* <div id="code">
* $ cd $qtdcm_source_dir<br>
* $ mkdir build<br>
* $ cd build<br>
* $ cmake ..<br>
* </div>
*
* Now you have to configure some CMake variables before compiling the project. Use ccmake like this:
* <div id="code">
* $ cd $qtdcm_source_dir/build<br>
* $ ccmake .
* </div>
*
* Then set the variables:
*
* Set the following CMake options values:
* <div id="code">
* ITK_DIR : /path/to/your/itk/build/directory<br>
* DCMTK_DIR : /usr/local<br>
* CMAKE_BUILD_TYPE : release<br>
* BUILD_SHARED_LIBS : ON<br>
* DCMTK_DIR : /path/to/your/dcmtk/build/directory<br>
* DCMTK_SOURCE_DIR : /path/to/your/dcmtk/source/directory<br>
* CMAKE_BUILD_TYPE : RelWithDebInfo<br>
* </div>
*
* If you want to play with the example or build this documentation, you can also set the following variables:
Expand All @@ -62,4 +69,4 @@
* Go to the \ref step3page step<br>
* Back to \ref step1page step
*
*/
*/
4 changes: 2 additions & 2 deletions documentation/step3.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
*
* If you want to build this documentation, type this command:
* <div id="code">
* $ make Documentation
* $ make doc
* </div>
*
* Back to \ref step2page step
*
*/
*/
Loading

0 comments on commit 0c90bc0

Please sign in to comment.