25 int main(
int argc,
char* argv[])
41 map<string, us::Any> parsedArgs = parser.
parseArguments(argc, argv);
43 if (parsedArgs.size()==0)
47 if ( parsedArgs.count(
"help") || parsedArgs.count(
"h"))
53 std::string inputFolder =
us::any_cast<
string>(parsedArgs[
"input"]);
54 std::string outFileName =
us::any_cast<
string>(parsedArgs[
"output"]);
58 std::list<mitk::Image::Pointer>
images;
59 std::map<mitk::Image::Pointer, mitk::DicomSeriesReader::StringContainer> fileMap;
62 for (mitk::DicomSeriesReader::FileNamesGrouping::const_iterator seriesIter = seriesInFiles.begin();
63 seriesIter != seriesInFiles.end();
74 images.push_back( image );
75 fileMap.insert( std::pair<mitk::Image::Pointer, mitk::DicomSeriesReader::StringContainer>(image,files));
80 for ( std::list<mitk::Image::Pointer>::const_iterator imageIter = images.begin();
81 imageIter != images.end();
int main(int argc, char *argv[])
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)
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