24 #include "itkSignedDanielssonDistanceMapImageFilter.h"
31 int main(
int argc,
char *argv[])
34 parser.
setTitle(
"Basic Distance Maps");
36 parser.
setDescription(
"Creates Eucledian Distance Maps of a given ROI segmentation");
43 map<string, us::Any> parsedArgs = parser.
parseArguments(argc, argv);
46 if (parsedArgs.size() == 0 || parsedArgs.count(
"help") || parsedArgs.count(
"h"))
52 std::string resultFile =
us::any_cast<
string>(parsedArgs[
"output"]);
53 std::string seedFile =
us::any_cast<
string>(parsedArgs[
"input"]);
63 danielssonDistance->SetInput(itkSeed);
64 danielssonDistance->SetUseImageSpacing(
true);
65 danielssonDistance->Update();
static void Save(const mitk::BaseData *data, const std::string &path)
Save a mitk::BaseData instance.
itk::Image< mitk::ScalarType, 3 > ResultType
itk::SmartPointer< Self > Pointer
void setContributor(std::string contributor)
int main(int argc, char *argv[])
ValueType * any_cast(Any *operand)
std::map< std::string, us::Any > parseArguments(const StringContainerType &arguments, bool *ok=nullptr)
Image::Pointer GrabItkImageMemory(itk::SmartPointer< ItkOutputImageType > &itkimage, mitk::Image *mitkImage=nullptr, const BaseGeometry *geometry=nullptr, bool update=true)
Grabs the memory of an itk::Image (with a specific type) and puts it into an mitk::Image.The memory is managed by the mitk::Image after calling this function. The itk::Image remains valid until the mitk::Image decides to free the memory.
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)
void setCategory(std::string category)
void setArgumentPrefix(const std::string &longPrefix, const std::string &shortPrefix)
void MITKCORE_EXPORT CastToItkImage(const mitk::Image *mitkImage, itk::SmartPointer< ItkOutputImageType > &itkOutputImage)
Cast an mitk::Image to an itk::Image with a specific type.
std::string helpText() const
itk::Image< unsigned char, 3 > BinaryType
void setTitle(std::string title)
void setDescription(std::string description)
static mitk::Image::Pointer LoadImage(const std::string &path)
LoadImage Convenience method to load an arbitrary mitkImage.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.