Skip to content

Commit

Permalink
Merge pull request #447 from kerautret/volReSampleExpFix
Browse files Browse the repository at this point in the history
Vol re sample exp fix
  • Loading branch information
dcoeurjo authored Feb 11, 2023
2 parents 354fa2d + 753dc79 commit 288cdca
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# DGtalTools 1.4 (beta)


- *volumetric*
- volReSample: fix the impossibility to export to vol when ITK is activated
(Bertrand Kerautret [#445](https://github.com/DGtal-team/DGtalTools/pull/445))

- *converters*
- mesh2vol: small fix to read generic mesh.
(Bertrand Kerautret [#444](https://github.com/DGtal-team/DGtal/pull/444))




# DGtalTools 1.3

- *build*
Expand Down
19 changes: 14 additions & 5 deletions volumetric/volReSample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,22 @@ int main( int argc, char** argv )
const functors::Identity aFunctor{};
SamplerImageAdapter sampledImage ( input3dImage, reSampler.getSubSampledDomain(), reSampler, aFunctor );
#ifdef WITH_ITK
ITKWriter<SamplerImageAdapter>::exportITK(outputFileName, sampledImage,
Z3i::RealPoint(aGridSizeReSample[0],
aGridSizeReSample[1],
aGridSizeReSample[2]));
const std::string ext = outputFileName.substr( outputFileName.find_last_of(".") + 1 );
if (std::find(ITK_IO_IMAGE_EXT.begin(),
ITK_IO_IMAGE_EXT.end(), ext) != ITK_IO_IMAGE_EXT.end() )
{
ITKWriter<SamplerImageAdapter>::exportITK(outputFileName, sampledImage,
Z3i::RealPoint(aGridSizeReSample[0],
aGridSizeReSample[1],
aGridSizeReSample[2]));
}
else
{
GenericWriter<SamplerImageAdapter>::exportFile(outputFileName, sampledImage);
}

#else
GenericWriter<SamplerImageAdapter>::exportFile(outputFileName, sampledImage);

#endif

return 0;
Expand Down

0 comments on commit 288cdca

Please sign in to comment.