-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc examples listing #1166
Merged
Merged
Doc examples listing #1166
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8dbc624
add dec link examples
kerautret f28861d
fix link doc-examples/exampleCatch.cpp
kerautret 1a16767
all dec examples
kerautret 334fdab
add doc-examples kernel examples
kerautret dfc3269
add listing example DCA
kerautret a17f588
add link DSLSubsegment
kerautret 10b37c5
[done] ref example geometry
kerautret 5ef6c82
[done] ref example images
kerautret 2aaa3ee
[done] ref example io
kerautret b1077e3
[done] ref example math
kerautret fb166e3
[done] ref example shapes
kerautret eb684f5
[done] ref example topology
kerautret 448bfc6
[done] ref example tutorial-examples
kerautret 33fee0f
correction of namespace in tuto 5
kerautret 666c26c
changelog
kerautret 0c6476b
typo include
kerautret c9f47ad
merge from master
kerautret 107e469
list example of volMarchingCubes
kerautret 8fb2821
correct num PR
kerautret cdf37ee
merge from master
kerautret 4a00cfc
remove test ref link in doc DEC
kerautret ac94263
merge from master
kerautret 2dd98b8
changelog diff
kerautret 1249a3b
strange travis (reload pb branch)...
kerautret cd4ce21
doc warning
kerautret File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
/** | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
**/ | ||
|
||
/** | ||
* @file 2DSliceImageFromVol.cpp | ||
* @ingroup tutorial-examples | ||
* @author Bertrand Kerautret (\c [email protected] ) | ||
* LORIA (CNRS, UMR 7503), University of Lorraine, France | ||
* | ||
* | ||
* @date 2016/05/09 | ||
* | ||
* @brief Example associated to the tutorial 5 on Image adapter | ||
* | ||
* This file is part of the DGtal library. | ||
*/ | ||
|
||
#include <iostream> | ||
#include <DGtal/base/Common.h> | ||
#include "DGtal/io/readers/GenericReader.h" | ||
#include "DGtal/io/writers/GenericWriter.h" | ||
|
||
#include <DGtal/helpers/StdDefs.h> | ||
#include <DGtal/images/ImageContainerBySTLVector.h> | ||
#include <DGtal/images/ConstImageAdapter.h> | ||
|
||
|
||
#include "DGtal/kernel/BasicPointFunctors.h" | ||
|
||
using namespace std; | ||
using namespace DGtal; | ||
using namespace Z2i; | ||
|
||
|
||
|
||
int main(int argc, char ** argv) | ||
{ | ||
|
||
typedef ImageContainerBySTLVector<Z2i::Domain, unsigned char> Image2D; | ||
typedef ImageContainerBySTLVector<Z3i::Domain, unsigned char> Image3D; | ||
|
||
if(argc < 3) | ||
{ | ||
trace.error() << "You need to indicate the volumetric image name and slice number as parameters." << std::endl; | ||
trace.error() << std::endl; | ||
return 1; | ||
} | ||
std::string filename(argv[1]); | ||
std::string outputFileName = "sliceImage.pgm"; | ||
|
||
unsigned int numSlice = atoi(argv[2]); | ||
|
||
trace.beginBlock("Loading file"); | ||
Image3D image3d = GenericReader< Image3D >::import ( filename ); | ||
|
||
|
||
functors::Identity id; | ||
typedef ConstImageAdapter<Image3D, Image2D::Domain, functors::Projector<Z3i::Space>, | ||
Image3D::Value, functors::Identity > SliceImageAdapter; | ||
functors::Projector<Z2i::Space > proj(2); | ||
Z2i::Domain domain2D(proj(image3d.domain().lowerBound()), | ||
proj(image3d.domain().upperBound())); | ||
|
||
DGtal::functors::Projector<Z3i::Space> aSliceFunctor(numSlice); | ||
aSliceFunctor.initAddOneDim(2); | ||
SliceImageAdapter sliceImageZ(image3d, domain2D, aSliceFunctor, id); | ||
|
||
trace.endBlock(); | ||
|
||
trace.beginBlock("Exporting..."); | ||
sliceImageZ >> outputFileName; | ||
trace.endBlock(); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+638 KB
src/DGtal/dec/doc/images/solve_2d_primal_decomposition_calculusSmall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an example to my comment: \example and @example must be moved to the example source code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes sure, now we can easily see with this PR which example should be completed.
But not sure that it implies a lot of doc comments since in general they are well given in the main module doc. Perhaps just to check if the short description of the example is ok and to check if the link to the doc module part exist.
yes, It should be a good idea and it could be more easy to check if all examples where documented ;)