24 int main(
int argc,
char* argv[])
40 std::map<std::string, us::Any> parsedArgs = parser.
parseArguments(argc, argv);
42 if (parsedArgs.size()==0)
46 if ( parsedArgs.count(
"help") || parsedArgs.count(
"h"))
52 std::string inputFolder =
us::any_cast<std::string>(parsedArgs[
"input"]);
53 std::string outFileName =
us::any_cast<std::string>(parsedArgs[
"output"]);
57 std::list<mitk::Image::Pointer>
images;
58 std::map<mitk::Image::Pointer, mitk::DicomSeriesReader::StringContainer> fileMap;
61 for (mitk::DicomSeriesReader::FileNamesGrouping::const_iterator seriesIter = seriesInFiles.begin();
62 seriesIter != seriesInFiles.end();
73 images.push_back( image );
74 fileMap.insert( std::pair<mitk::Image::Pointer, mitk::DicomSeriesReader::StringContainer>(image,files));
79 for ( std::list<mitk::Image::Pointer>::const_iterator imageIter = images.begin();
80 imageIter != images.end();
std::vector< std::string > StringContainer
Lists of filenames.
void setContributor(std::string contributor)
static DataNode::Pointer LoadDicomSeries(const StringContainer &filenames, bool sort=true, bool load4D=true, bool correctGantryTilt=true, UpdateCallBackMethod callback=nullptr, itk::SmartPointer< Image > preLoadedImageBlock=nullptr)
ValueType * any_cast(Any *operand)
std::map< std::string, us::Any > parseArguments(const StringContainerType &arguments, bool *ok=nullptr)
static bool SaveImage(mitk::Image::Pointer image, const std::string &path)
SaveImage Convenience method to save an arbitrary mitkImage.
void addArgument(const std::string &longarg, const std::string &shortarg, Type type, const std::string &argLabel, const std::string &argHelp=std::string(), const us::Any &defaultValue=us::Any(), bool optional=true, bool ignoreRest=false, bool deprecated=false)
static FileNamesGrouping GetSeries(const std::string &dir, bool groupImagesWithGantryTilt, const StringContainer &restrictions=StringContainer())
see other GetSeries().
Image class for storing images.
void setCategory(std::string category)
void setArgumentPrefix(const std::string &longPrefix, const std::string &shortPrefix)
int main(int argc, char *argv[])
std::string helpText() const
std::map< std::string, ImageBlockDescriptor > FileNamesGrouping
void setTitle(std::string title)
void setDescription(std::string description)
section MAP_FRAME_Mapper_Settings Mapper settings For the mapping of corrected images