itkSetMacro(OutputFilename, std::string);
void SetROIType(std::string type);
itkSetMacro(ThresholdValue, PixelType);
+ itkSetMacro(SkipInitialStructuresFlag, bool);
// Run filter
void Update();
std::string m_ROIType;
PixelType m_ThresholdValue;
std::vector<std::string> m_InputFilenames;
+ bool m_SkipInitialStructuresFlag;
};
//--------------------------------------------------------------------
m_DicomFolder = "";
m_OutputFilename = "default-output.dcm";
m_ThresholdValue = 0.5;
+ m_SkipInitialStructuresFlag = false;
}
//--------------------------------------------------------------------
// Init writer
vtkGDCMPolyDataWriter * writer = vtkGDCMPolyDataWriter::New();
int numMasks = reader->GetNumberOfOutputPorts() + m;
+
+ if (m_SkipInitialStructuresFlag) {
+ numMasks = m;
+ }
+
writer->SetNumberOfInputPorts(numMasks);
writer->SetFileName(m_OutputFilename.c_str());
writer->SetMedicalImageProperties(reader->GetMedicalImageProperties());
filter.SetOutputFilename(args_info.output_arg);
filter.SetROIType(args_info.roitype_arg);
filter.SetThresholdValue(args_info.threshold_arg);
+ filter.SetSkipInitialStructuresFlag(args_info.skip_flag);
filter.Update();
// This is the end my friend
option "output" o "Output DicomRT filename" string yes
option "threshold" t "Threshold for binary image" float no default = "0.5"
+option "skip" s "Do not write in output the structures that was in input" flag off
option "roitype" - "Name of the type of roi added into the rt-struct" string no default = "ORGAN"