cerr package
Subpackages
- cerr.contour package
- cerr.dataclasses package
- Submodules
- cerr.dataclasses.beams module
get_empty_list()get_empty_np_array()BeamsBeams.PatientIDBeams.PatientBirthDateBeams.PatientSexBeams.ManufacturerBeams.ManufacturerModelNameBeams.PixelPaddingValueBeams.RTPlanLabelBeams.RTPlanDateBeams.RTPlanTimeBeams.RTPlanGeometryBeams.TreatmentSitesBeams.PrescriptionDescriptionBeams.FractionGroupSequenceBeams.BeamSequenceBeams.PatientSetupSequenceBeams.ReferencedStructureSetSequenceBeams.ReferencedDoseSequenceBeams.ApprovalStatusBeams.ReviewDateBeams.ReviewTimeBeams.ReviewerNameBeams.SOPInstanceUIDBeams.beamFileNameBeams.manufacturerBeams.manufacturerModelNameBeams.deIdentificationMethodBeams.deidentificationMethodDescriptionBeams.BeamUIDBeams.PatientNameBeams.PatientIDBeams.PatientBirthDateBeams.PatientSexBeams.ManufacturerBeams.ManufacturerModelNameBeams.RelationshipGroupLengthBeams.ImagePresentationGroupLengthBeams.PixelPaddingValueBeams.PlanGroupLengthBeams.RTPlanLabelBeams.RTPlanDateBeams.RTPlanTimeBeams.RTPlanGeometryBeams.TreatmentSitesBeams.PrescriptionDescriptionBeams.DoseReferenceSequenceBeams.FractionGroupSequenceBeams.BeamSequenceBeams.PatientSetupSequenceBeams.ReferencedRTGroupLengthBeams.ReferencedStructureSetSequenceBeams.ReferencedDoseSequenceBeams.ReviewGroupLengthBeams.ApprovalStatusBeams.ReviewDateBeams.ReviewTimeBeams.ReviewerNameBeams.SOPInstanceUIDBeams.beamFileNameBeams.manufacturerBeams.manufacturerModelNameBeams.deIdentificationMethodBeams.deidentificationMethodDescriptionBeams.BeamUID
ReferenceSeqPatientSetupSeqDoseReferenceSeqDoseReferenceSeq.DoseReferenceUIDDoseReferenceSeq.ReferencedROINumberDoseReferenceSeq.DeliveryMaximumDoseDoseReferenceSeq.TargetPrescriptionDoseDoseReferenceSeq.DoseReferenceTypeDoseReferenceSeq.DoseReferenceUIDDoseReferenceSeq.ReferencedROINumberDoseReferenceSeq.DeliveryMaximumDoseDoseReferenceSeq.TargetPrescriptionDose
BeamLimitingDevicePositionSeqControlPointSequenceControlPointSequence.ControlPointIndexControlPointSequence.NominalBeamEnergyControlPointSequence.GantryAngleControlPointSequence.GantryRotationDirectionControlPointSequence.BeamLimitingDeviceAngleControlPointSequence.BeamLimitingDeviceRotationDirectionControlPointSequence.PatientSupportAngleControlPointSequence.TableTopEccentricAngleControlPointSequence.TableTopEccentricRotationDirectionControlPointSequence.IsocenterPositionControlPointSequence.SourceToSurfaceDistanceControlPointSequence.CumulativeMetersetWeightControlPointSequence.BeamLimitingDevicePositionSequenceControlPointSequence.ControlPointIndexControlPointSequence.NominalBeamEnergyControlPointSequence.GantryAngleControlPointSequence.GantryRotationDirectionControlPointSequence.BeamLimitingDeviceAngleControlPointSequence.BeamLimitingDeviceRotationDirectionControlPointSequence.PatientSupportAngleControlPointSequence.TableTopEccentricAngleControlPointSequence.TableTopEccentricRotationDirectionControlPointSequence.IsocenterPositionControlPointSequence.SourceToSurfaceDistanceControlPointSequence.CumulativeMetersetWeight
RefBeamSeqFractionGroupSeqFractionGroupSeq.NumberOfFractionsPlannedFractionGroupSeq.NumberOfBeamsFractionGroupSeq.NumberOfBrachyApplicationSetupsFractionGroupSeq.RadiationTypeFractionGroupSeq.RefBeamSeqFractionGroupSeq.FractionGroupNumberFractionGroupSeq.NumberOfFractionsPlannedFractionGroupSeq.NumberOfBeamsFractionGroupSeq.NumberOfBrachyApplicationSetupsFractionGroupSeq.RadiationTypeFractionGroupSeq.RefBeamSeq
BeamSeqBeamSeq.BeamNameBeamSeq.BeamTypeBeamSeq.BeamDescriptionBeamSeq.BeamNumberBeamSeq.SourceAxisDistanceBeamSeq.BeamLimitingDevicePositionSeqBeamSeq.RadiationTypeBeamSeq.TreatmentDeliveryTypeBeamSeq.NumberOfWedgesBeamSeq.NumberOfBoliBeamSeq.NumberOfCompensatorsBeamSeq.NumberOfBlocksBeamSeq.NumberOfControlPointsBeamSeq.ControlPointSequenceBeamSeq.ManufacturerBeamSeq.BeamNameBeamSeq.BeamTypeBeamSeq.BeamDescriptionBeamSeq.BeamNumberBeamSeq.SourceAxisDistanceBeamSeq.BeamLimitingDevicePositionSeqBeamSeq.RadiationTypeBeamSeq.TreatmentDeliveryTypeBeamSeq.NumberOfWedgesBeamSeq.NumberOfBoliBeamSeq.NumberOfCompensatorsBeamSeq.NumberOfBlocksBeamSeq.NumberOfControlPointsBeamSeq.ControlPointSequenceBeamSeq.json_serialize
load_beams()
- cerr.dataclasses.deform module
get_empty_list()get_empty_np_array()DeformDeform.baseScanUIDDeform.movScanUIDDeform.algorithmDeform.algorithmParamsDeform.deformParamsDeform.deformUIDDeform.registrationToolDeform.deformOutFileTypeDeform.deformOutFilePathDeform.dvfMatrixDeform.xOffsetDeform.yOffsetDeform.dxDeform.dyDeform.imageOrientationPatientDeform.imagePositionPatientVDeform.zValuesVDeform.Image2PhysicalTransMDeform.Image2VirtualPhysicalTransMDeform.cerrToDcmTransMDeform.convertDcmToCerrVirtualCoords()Deform.getDVFXYZVals()Deform.getDeformDict()
flipSliceOrderFlag()
- cerr.dataclasses.dose module
get_empty_list()get_empty_np_array()DoseDose.patientNameDose.doseTypeDose.doseSummationTypeDose.refBeamNumberDose.refFractionGroupNumberDose.numberMultiFrameImagesDose.doseUnitsDose.doseScaleDose.fractionGroupIDDose.imagePositionPatientDose.imageOrientationPatientDose.sizeOfDimension1Dose.sizeOfDimension2Dose.sizeOfDimension3Dose.coord1OFFirstPointDose.coord2OFFirstPointDose.horizontalGridIntervalDose.verticalGridIntervalDose.writerDose.dateWrittenDose.studyInstanceUIDDose.manufacturerDose.manufacturerModelNameDose.deIdentificationMethodDose.deidentificationMethodDescriptionDose.xcoordOfNormaliznPointDose.ycoordOfNormaliznPointDose.zcoordOfNormaliznPointDose.doseAtNormaliznPointDose.coord3OfFirstPointDose.doseArrayDose.zValuesDose.deliveredDose.transMDose.doseUIDDose.assocScanUIDDose.assocBeamUIDDose.doseFileNameDose.frameOfReferenceUIDDose.refRTPlanSopInstanceUIDDose.refStructSetSopInstanceUIDDose.prescriptionDoseDose.doseOffsetDose.Image2PhysicalTransMDose.cerrDcmSliceDirMatchDose.caseNumberDose.patientNameDose.doseNumberDose.doseTypeDose.doseSummationTypeDose.refBeamNumberDose.refFractionGroupNumberDose.numberMultiFrameImagesDose.doseUnitsDose.doseScaleDose.fractionGroupIDDose.numberOfTxDose.orientationOfDoseDose.imagePositionPatientDose.imageOrientationPatientDose.numberRepresentationDose.numberOfDimensionsDose.sizeOfDimension1Dose.sizeOfDimension2Dose.sizeOfDimension3Dose.coord1OFFirstPointDose.coord2OFFirstPointDose.horizontalGridIntervalDose.verticalGridIntervalDose.doseDescriptionDose.doseEditionDose.unitNumberDose.writerDose.dateWrittenDose.planNumberOfOriginDose.planEditionOfOriginDose.studyNumberOfOriginDose.studyInstanceUIDDose.manufacturerDose.manufacturerModelNameDose.deIdentificationMethodDose.deidentificationMethodDescriptionDose.versionNumberOfProgramDose.xcoordOfNormaliznPointDose.ycoordOfNormaliznPointDose.zcoordOfNormaliznPointDose.doseAtNormaliznPointDose.doseErrorDose.coord3OfFirstPointDose.depthGridIntervalDose.planIDOfOriginDose.doseArrayDose.zValuesDose.deliveredDose.cachedColorDose.cachedTimeDose.numCachedSlicesDose.transferProtocolDose.associatedScanDose.transMDose.doseUIDDose.assocScanUIDDose.assocBeamUIDDose.doseFileNameDose.frameOfReferenceUIDDose.refRTPlanSopInstanceUIDDose.refStructSetSopInstanceUIDDose.prescriptionDoseDose.doseOffsetDose.cerrToDcmTransMDose.Image2PhysicalTransMDose.cerrDcmSliceDirMatchDose.json_serializeDose.getNiiAffine()Dose.getSitkImage()Dose.getDoseDict()Dose.saveNii()Dose.getImage2PhysicalTransM()Dose.convertDcmToCerrVirtualCoords()Dose.getDoseXYZVals()Dose.getDoseAt()Dose.getAssociatedBeamNum()
loadDose()importNii()getDoseNumFromUID()getPrescriptionDose()getNumFrx()getFrxSize()fractionSizeCorrect()fractionNumCorrect()sum()
- cerr.dataclasses.header module
- cerr.dataclasses.imrt module
- cerr.dataclasses.scan module
get_empty_list()get_empty_np_array()ScanScan.scanArrayScan.scanTypeScan.scanInfoScan.scanUIDScan.assocDeformUIDScan.assocTextureUIDScan.assocBaseScanUIDScan.assocMovingScanUIDScan.Image2PhysicalTransMScan.Image2VirtualPhysicalTransMScan.cerrToDcmTransMScan.scanArrayScan.scanTypeScan.scanInfoScan.uniformScanInfoScan.scanArraySuperiorScan.scanArrayInferiorScan.thumbnailsScan.transMScan.scanUIDScan.assocDeformUIDScan.assocTextureUIDScan.assocBaseScanUIDScan.assocMovingScanUIDScan.Image2PhysicalTransMScan.Image2VirtualPhysicalTransMScan.cerrToDcmTransMScan.json_serializeScan.getScanArray()Scan.getNiiAffine()Scan.saveNii()Scan.getSitkImage()Scan.getScanXYZVals()Scan.getScanSize()Scan.getUniformScanSize()Scan.getScanOrientation()Scan.getScanSpacing()Scan.convertDcmToCerrVirtualCoords()Scan.convertDcmToRealWorldUnits()Scan.convertToSUV()Scan.getScanDict()Scan.getDcmScanInfo()
flipSliceOrderFlag()getITKDirection()dcm_hhmmss()dcm_to_np_date()get_slice_position()populateScanInfoFields()populateRealWorldFields()populateRadiopharmaFields()parseScanInfoFields()loadSortedScanInfo()parseScanInfoFromDB()getScanNumFromUID()getCERRScanArrayFromITK()
- cerr.dataclasses.scan_info module
get_empty_list()get_empty_np_array()ScanInfoScanInfo.imageTypeScanInfo.patientNameScanInfo.patientIDScanInfo.patientBirthDateScanInfo.CTOffsetScanInfo.rescaleSlopeScanInfo.rescaleInterceptScanInfo.rescaleTypeScanInfo.scaleSlopeScanInfo.scaleInterceptScanInfo.realWorldValueSlopeScanInfo.realWorldValueInterceptScanInfo.realWorldMeasurCodeMeaningScanInfo.philipsImageUnitsScanInfo.philipsRescaleSlopeScanInfo.philipsRescaleInterceptScanInfo.grid1UnitsScanInfo.grid2UnitsScanInfo.bitsAllocatedScanInfo.bitsStoredScanInfo.pixelRepresentationScanInfo.numberOfDimensionsScanInfo.sizeOfDimension1ScanInfo.sizeOfDimension2ScanInfo.zValueScanInfo.xOffsetScanInfo.yOffsetScanInfo.sliceThicknessScanInfo.voxelThicknessScanInfo.seriesDescriptionScanInfo.studyDescriptionScanInfo.scannerTypeScanInfo.manufacturerScanInfo.scanFileNameScanInfo.bValueScanInfo.acquisitionDateScanInfo.acquisitionTimeScanInfo.patientWeightScanInfo.patientSizeScanInfo.patientBmiScanInfo.patientSexScanInfo.injectionTimeScanInfo.injectionDateScanInfo.injectedDoseScanInfo.halfLifeScanInfo.imageUnitsScanInfo.suvTypeScanInfo.petCountSourceScanInfo.petSeriesTypeScanInfo.philipsActivityConcentrationScaleFactorScanInfo.petNumSlicesScanInfo.petDecayCorrectionDateTimeScanInfo.decayCorrectionScanInfo.correctedImageScanInfo.seriesDateScanInfo.seriesTimeScanInfo.studyDateScanInfo.studyTimeScanInfo.studyInstanceUIDScanInfo.seriesInstanceUIDScanInfo.sopInstanceUIDScanInfo.sopClassUIDScanInfo.frameOfReferenceUIDScanInfo.imageOrientationPatientScanInfo.imagePositionPatientScanInfo.windowCenterScanInfo.windowWidthScanInfo.temporalPositionIndexScanInfo.triggerTimeScanInfo.frameAcquisitionDurationScanInfo.frameReferenceDateTimeScanInfo.patientIdentityRemovedScanInfo.deIdentificationMethodScanInfo.deidentificationMethodDescriptionScanInfo.ContrastBolusAgentScanInfo.philipsSUVScaleFactorScanInfo.philipsActivityConcentrationScaleFactorScanInfo.gePETDecayCorrectionDateTimeScanInfo.siemensPETDecayCorrectionDateTimeScanInfo.imageNumberScanInfo.imageTypeScanInfo.caseNumberScanInfo.patientNameScanInfo.patientIDScanInfo.patientBirthDateScanInfo.scanTypeScanInfo.CTOffsetScanInfo.rescaleSlopeScanInfo.rescaleInterceptScanInfo.rescaleTypeScanInfo.scaleSlopeScanInfo.scaleInterceptScanInfo.realWorldValueSlopeScanInfo.realWorldValueInterceptScanInfo.realWorldMeasurCodeMeaningScanInfo.philipsImageUnitsScanInfo.philipsRescaleSlopeScanInfo.philipsRescaleInterceptScanInfo.grid1UnitsScanInfo.grid2UnitsScanInfo.numberRepresentationScanInfo.bitsAllocatedScanInfo.bitsStoredScanInfo.pixelRepresentationScanInfo.numberOfDimensionsScanInfo.sizeOfDimension1ScanInfo.sizeOfDimension2ScanInfo.zValueScanInfo.xOffsetScanInfo.yOffsetScanInfo.CTAirScanInfo.CTWaterScanInfo.sliceThicknessScanInfo.voxelThicknessScanInfo.siteOfInterestScanInfo.unitNumberScanInfo.seriesDescriptionScanInfo.studyDescriptionScanInfo.scannerTypeScanInfo.manufacturerScanInfo.scanFileNameScanInfo.headInOutScanInfo.positionInScanScanInfo.patientAttitudeScanInfo.bValueScanInfo.acquisitionDateScanInfo.acquisitionTimeScanInfo.patientWeightScanInfo.patientSizeScanInfo.patientBmiScanInfo.patientSexScanInfo.injectionTimeScanInfo.injectionDateScanInfo.injectedDoseScanInfo.halfLifeScanInfo.imageUnitsScanInfo.suvTypeScanInfo.petCountSourceScanInfo.petSeriesTypeScanInfo.petNumSlicesScanInfo.petPrimarySourceOfCountsScanInfo.petDecayCorrectionDateTimeScanInfo.petDecayCorrectionScanInfo.petCorrectedImageScanInfo.seriesDateScanInfo.seriesTimeScanInfo.studyDateScanInfo.studyTimeScanInfo.tapeOfOriginScanInfo.studyNumberOfOriginScanInfo.scanIDScanInfo.scanNumberScanInfo.scanDateScanInfo.CTScaleScanInfo.distrustAboveScanInfo.imageSourceScanInfo.transferProtocolScanInfo.studyInstanceUIDScanInfo.seriesInstanceUIDScanInfo.sopInstanceUIDScanInfo.sopClassUIDScanInfo.frameOfReferenceUIDScanInfo.patientPositionScanInfo.imageOrientationPatientScanInfo.imagePositionPatientScanInfo.windowCenterScanInfo.windowWidthScanInfo.temporalPositionIndexScanInfo.triggerTimeScanInfo.frameAcquisitionDurationScanInfo.frameReferenceDateTimeScanInfo.patientIdentityRemovedScanInfo.deIdentificationMethodScanInfo.deidentificationMethodDescriptionScanInfo.contrastBolusAgentScanInfo.philipsSUVScaleFactorScanInfo.philipsActivityConcentrationScaleFactorScanInfo.gePETDecayCorrectionDateTimeScanInfo.siemensPETDecayCorrectionDateTime
UniformScanInfodeduce_voxel_thickness()
- cerr.dataclasses.structure module
get_empty_list()get_empty_np_array()StructureStructure.patientNameStructure.structureNameStructure.ROIInterpretedTypeStructure.numberOfScansStructure.dateWrittenStructure.structureColorStructure.structureDescriptionStructure.roiGenerationAlgorithmStructure.roiGenerationDescriptionStructure.contourStructure.rasterSegmentsStructure.strUIDStructure.assocScanUIDStructure.structSetSopInstanceUIDStructure.referencedFrameOfReferenceUIDStructure.referencedSeriesUIDStructure.structureFileNameStructure.manufacturerModelNameStructure.writerStructure.structureFileFormatStructure.deIdentificationMethodStructure.deidentificationMethodDescriptionStructure.roiNumberStructure.patientNameStructure.structureNameStructure.ROIInterpretedTypeStructure.structureFormatStructure.numberOfScansStructure.maximumNumberScansStructure.maximumPointsPerSegmentStructure.maximumSegmentsPerScanStructure.structureEditionStructure.writerStructure.manufacturerModelNameStructure.dateWrittenStructure.structureColorStructure.structureDescriptionStructure.roiGenerationAlgorithmStructure.roiGenerationDescriptionStructure.studyNumberOfOriginStructure.contourStructure.rasterSegmentsStructure.DSHPointsStructure.orientationOfStructureStructure.transferProtocolStructure.visibleStructure.strUIDStructure.assocScanUIDStructure.structSetSopInstanceUIDStructure.rasterizedStructure.referencedFrameOfReferenceUIDStructure.referencedSeriesUIDStructure.structureFileNameStructure.structureFileFormatStructure.deIdentificationMethodStructure.deidentificationMethodDescriptionStructure.saveNii()Structure.convertDcmToCerrVirtualCoords()Structure.getStructureAssociatedScan()Structure.getSitkImage()Structure.getContourPolygons()Structure.getStructDict()Structure.saveJson()Structure.saveContoursToJson()
ContourSegmentjsonSerializeSegmentjsonSerializeContourjsonSerializeStructgetJsonList()saveJson()importJson()parseContours()loadStructure()importNii()importStructureMask()createSitkImage()getColorForStructNum()copyToScan()getStructNumFromUID()getStructNumFromSOPInstanceUID()calcIsocenter()getMatchingIndex()getClosedMask()getLargestConnComps()getSurfaceExpand()getGaussianBlurredMask()getBsplineSmoothing()getLabelMap()getMaskList()
- Module contents
- cerr.datasets package
- cerr.dcm_export package
- Submodules
- cerr.dcm_export.iod_helper module
- cerr.dcm_export.reg_iod module
getDcmTagVals()createREGDataset()generateBaseDataset()getFileMeta()addRequiredElementsToDs()addSequenceListsToDs()addStudyAndSeriesInformation()addPatientInformation()addContentInformation()getRefImgSeq()addRefSeriesSequence()getDVFMetadata()getImgDirMetadata()createDeformSeq()getREGTypeCodeSeq()getDVFGridSeq()getMatrixSeq()loadMatrixFile()loadSortedSeriesData()getSlicePosition()get_slice_directions()create()createDVF()
- cerr.dcm_export.rtstruct_iod module
- Module contents
- cerr.imrtp package
- Subpackages
- Submodules
- cerr.imrtp.imrtp module
- cerr.imrtp.imrtp_gui module
- imrtp_gui
GeometryPreviewbeamGeometry()beamPolylines()IMRTPGuiWindowIMRTPGuiWindow.closeEvent()IMRTPGuiWindow.statusbarMsg()IMRTPGuiWindow.waitbar()IMRTPGuiWindow.markStale()IMRTPGuiWindow.refreshScan()IMRTPGuiWindow.refreshStructs()IMRTPGuiWindow.refreshBeams()IMRTPGuiWindow.refreshPreview()IMRTPGuiWindow.refreshBeamParams()IMRTPGuiWindow.refreshIMParams()IMRTPGuiWindow.refreshMCParams()IMRTPGuiWindow.refreshBrowser()IMRTPGuiWindow.beamParamChanged()IMRTPGuiWindow.autoCheckChanged()IMRTPGuiWindow.newBeam()IMRTPGuiWindow.newEquispaced()IMRTPGuiWindow.delBeam()IMRTPGuiWindow.selectBeam()IMRTPGuiWindow.previewAngleChanged()IMRTPGuiWindow.previewDragFinished()IMRTPGuiWindow.selScan()IMRTPGuiWindow.addGoal()IMRTPGuiWindow.delGoal()IMRTPGuiWindow.pbMarginText()IMRTPGuiWindow.strSampleRate()IMRTPGuiWindow.targBoxClicked()IMRTPGuiWindow.imParamChanged()IMRTPGuiWindow.mcParamChanged()IMRTPGuiWindow.browseIM()IMRTPGuiWindow.deleteIM()IMRTPGuiWindow.renameIM()IMRTPGuiWindow.save()IMRTPGuiWindow.showDose()
IMRTPGui()
- cerr.imrtp.imrtp_problem module
- imrtp_problem
BEAM_FIELD_NAMESBEAM_FIELD_EDITABLEPARAM_NAMESMC_PARAM_NAMESGOAL_FIELDSIsocenterBeamletIMBeamIMBeam.beamNumIMBeam.beamModalityIMBeam.beamEnergyIMBeam.isocenterIMBeam.isodistanceIMBeam.arcAngleIMBeam.couchAngleIMBeam.collimatorAngleIMBeam.gantryAngleIMBeam.beamDescriptionIMBeam.beamletDelta_xIMBeam.beamletDelta_yIMBeam.dateOfCreationIMBeam.beamTypeIMBeam.zRelIMBeam.xRelIMBeam.yRelIMBeam.sigma_100IMBeam.beamUIDIMBeam.beamletsIMBeam.RTOGPBVectorsMIMBeam.xPBPosVIMBeam.yPBPosVIMBeam.sourcePos()
IMGoalScatterParamsVMCParamsIMParamsIMSolutionIMRTProbleminitIMRTProblem()createDefaultBeam()resolveIsocenter()conditionBeam()addEquispacedBeams()addGoal()getIMList()saveIMToPlan()asDict()
- Module contents
- cerr.mri_metrics package
- cerr.radiomics package
- Submodules
- cerr.radiomics.first_order module
- cerr.radiomics.gray_level_cooccurence module
- cerr.radiomics.ibsi1 module
- cerr.radiomics.neighbor_gray_level_dependence module
- cerr.radiomics.neighbor_gray_tone module
- cerr.radiomics.preprocess module
- cerr.radiomics.run_length module
- cerr.radiomics.shape module
- cerr.radiomics.size_zone module
- cerr.radiomics.texture_filters module
meanFilter()sobelFilter()LoGFilter()gaborFilter()gaborFilter3d()get3dLawsMask()getLawsMasks()lawsFilter()energyFilter()lawsEnergyFilter()rotationInvariantLawsFilter()rotationInvariantLawsEnergyFilter()wkeep()decomposeLOC()swt()swt2()getWaveletSubbands()waveletFilter()rotationInvariantWaveletFilter()getMatchFields()aggregateRotatedResponses()rot3d90()rotate3dSequence()flipSequenceForWavelets()rotationInvariantFilt()
- cerr.radiomics.texture_utils module
- cerr.radiomics.vector_elasticity module
- Module contents
- cerr.registration package
- cerr.roe package
- cerr.utils package
- cerr.viewer package
- Submodules
- cerr.viewer.pycerr_napari module
initialize_image_window_widget()initialize_struct_edit_widget()get_scan_layers()initialize_struct_create_widget()getLabelsDict()getLabelsList()initialize_struct_export_widget()checkerboard_indices()getRCSwithinScanExtents()updateMirror()mirror_scope_callback()initialize_reg_qa_widget()initialize_dose_select_widget()initialize_dose_colorbar_widget()initialize_dvf_colorbar_widget()showNapari()captureToFile()
- cerr.viewer.pycerr_gui module
- pyCERR Viewer GUI
cerr_get_cmap()cerr_get_lut()ascending()SliceViewSliceView.sliceChangedSliceView.cursorMovedSliceView.viewResetSliceView.contextRequestedSliceView.rulerChangedSliceView.strokeFinishedSliceView.brushStrokeSliceView.brushDoneSliceView.crosshairDraggedSliceView.CLICK_PXSliceView.is3dSliceView.uses_vtkSliceView.set_projection()SliceView.cancel_polygon()SliceView.clear_draw_artists()SliceView.reset_view()SliceView.ruler_length()SliceView.redraw_ruler()SliceView.clear_ruler()SliceView.set_range()
DoseColorbarWidgetDoseColorbarWidget.GRAB_PXDoseColorbarWidget.TOPDoseColorbarWidget.BOTDoseColorbarWidget.setDose()DoseColorbarWidget.paintEvent()DoseColorbarWidget.mousePressEvent()DoseColorbarWidget.contextMenuEvent()DoseColorbarWidget.mouseMoveEvent()DoseColorbarWidget.mouseReleaseEvent()DoseColorbarWidget.mouseDoubleClickEvent()
PyCerrViewerPyCerrViewer.setPlanC()PyCerrViewer.getPlanC()PyCerrViewer.display_dose()PyCerrViewer.setBeams()PyCerrViewer.set_scan()PyCerrViewer.set_dose()PyCerrViewer.set_dose_alpha()PyCerrViewer.set_window_level()PyCerrViewer.set_window_preset()PyCerrViewer.set_scan_colormap()PyCerrViewer.set_scan_opacity()PyCerrViewer.set_orientation()PyCerrViewer.set_slice()PyCerrViewer.set_structures_visible()PyCerrViewer.goto_structure()PyCerrViewer.set_crosshairs()PyCerrViewer.set_orientation_labels()PyCerrViewer.set_structure_dots()PyCerrViewer.set_contour_linewidth()PyCerrViewer.set_lock_views()PyCerrViewer.save_screenshot()PyCerrViewer.start_reg_qa()PyCerrViewer.stop_reg_qa()PyCerrViewer.compute_dvh()PyCerrViewer.export_dvh()PyCerrViewer.closeEvent()PyCerrViewer.import_dicom()PyCerrViewer.dragEnterEvent()PyCerrViewer.dragMoveEvent()PyCerrViewer.dropEvent()PyCerrViewer.load_path()PyCerrViewer.import_nii_scan()PyCerrViewer.import_nii_dose()PyCerrViewer.import_nii_struct()PyCerrViewer.open_pkl()PyCerrViewer.save_pkl()PyCerrViewer.after_load()PyCerrViewer.on_scan_changed()PyCerrViewer.on_dose_changed()PyCerrViewer.on_alpha()PyCerrViewer.on_scan_cmap()PyCerrViewer.on_scan_alpha()PyCerrViewer.on_preset()PyCerrViewer.on_manual_wl()PyCerrViewer.on_slice_changed()PyCerrViewer.on_lock_toggled()PyCerrViewer.on_crosshair_toggled()PyCerrViewer.on_orientation_toggled()PyCerrViewer.reset_all_views()PyCerrViewer.set_layout()PyCerrViewer.on_ruler_changed()PyCerrViewer.on_cursor_moved()PyCerrViewer.on_struct_dots()PyCerrViewer.on_struct_linewidth()PyCerrViewer.on_struct_double_click()PyCerrViewer.goto_struct_center()PyCerrViewer.refresh_views()PyCerrViewer.on_crosshair_dragged()PyCerrViewer.show_dvh_dialog()PyCerrViewer.show_contour_dialog()PyCerrViewer.show_reg_dialog()PyCerrViewer.show_imrtp_gui()PyCerrViewer.show_roe_gui()PyCerrViewer.show_about()
DvhDialogContourDialogRegQaDialoglaunch()show()capture()main()
- cerr.viewer.pycerr_nbviewer module
- pyCERR Notebook Viewer
cerr_get_cmap()NbViewerNbViewer.render_figure()NbViewer.set_scan()NbViewer.set_window_level()NbViewer.set_window_preset()NbViewer.set_scan_colormap()NbViewer.set_scan_opacity()NbViewer.set_dose()NbViewer.set_dose_alpha()NbViewer.set_dose_colormap()NbViewer.set_structures_visible()NbViewer.set_structure_dots()NbViewer.set_contour_linewidth()NbViewer.set_crosshairs()NbViewer.set_orientation_labels()NbViewer.set_slice()NbViewer.goto_structure()NbViewer.compute_dvh()NbViewer.export_dvh()NbViewer.save_screenshot()NbViewer.setPlanC()NbViewer.getPlanC()NbViewer.refresh()
showNB()
- cerr.viewer.cerr_colormaps module
- Module contents
Submodules
cerr.dvh module
- cerr.dvh.getDVH(structNum, doseNum, planC)[source]
Routine to calculate Dose and Volume vectors to be used for Histogram calculation
- Parameters:
structNum (int) – Binary mask where 1s represent the segmentation
doseNum (int) – x-values i.e. coordinates of columns of input mask
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object
- Returns:
vector of dose values for voxels in structNum List (volsV): vector of volumes corresponding to voxels in dosesV int (isError): error flag. 0: No error, 1: error in calculation
- Return type:
List (dosesV)
- cerr.dvh.accumulate(V1, V2, indV)[source]
Accumulate values from V2 into V1 at positions specified by indV.
For each element in V2, adds its value to V1 at the corresponding index given by indV. Operates in-place and also returns the modified V1.
- Parameters:
V1 (np.ndarray) – Target array that will be updated in-place.
V2 (np.ndarray) – Source values to add into V1.
indV (np.ndarray) – Integer index array; indV[i] is the position in V1 where V2[i] should be accumulated.
- Returns:
The updated V1 array.
- Return type:
np.ndarray
- cerr.dvh.doseHist(doseV, volsV, binWidth)[source]
Routine to calculate Dose Volume Histogram from input dose and volume vectors
- Parameters:
doseV (List) – vector of dose values for voxels in structNum
volsV (List) – vector of volumes corresponding to voxels in dosesV
binWidth (float) – Bin-width of dose bins.
- Returns:
vector of dose bin centers. List (volsHistV): vector of volumes accumulated in corresponding dose bins.
- Return type:
List (doseBinsV)
- cerr.dvh.MOHx(doseBinsV, volsHistV, percent)[source]
This routine computes the mean of hottest x% dose.
- Parameters:
doseBinsV – (List): vector of dose bin centers.
volsHistV (List) – vector of volumes accumulated in corresponding dose bins.
percent (float) – cutoff in terms of percentage. (e.g. 90)
- Returns:
mean of the hottest x% dose
- Return type:
Float
- cerr.dvh.MOCx(doseBinsV, volsHistV, percent)[source]
This routine computes the mean of coldest x% dose.
doseBinsV: (List): vector of dose bin centers. volsHistV (List): vector of volumes accumulated in corresponding dose bins. percent (float): cutoff in terms of percentage. (e.g. 10)
- Returns:
mean of the coldest x% dose
- Return type:
Float
- cerr.dvh.Vx(doseBinsV, volsHistV, doseCutoff, volumeType=None)[source]
This routine computes the volume receiving at least x dose.
- Parameters:
doseBinsV – (List): vector of dose bin centers.
volsHistV (List) – vector of volumes accumulated in corresponding dose bins.
doseCutoff – dose cutoff in Gy.
volumeType (int) – 0: Return output volume as absolute cc. 1: Return output volume as percentage.
- Returns:
Volume (absolute ot percentage)
- Return type:
Float
- cerr.dvh.Dx(doseBinsV, volsHistV, volCutoff, volumeType=None)[source]
” This routine computes the minimum dose to the hottest x% volume.
- Parameters:
doseBinsV – (List): vector of dose bin centers.
volsHistV (List) – vector of volumes accumulated in corresponding dose bins.
volCutoff – volume cutoff in cc or percentage.
volumeType (int) – 0: volume is input in absolute cc. 1: volume is input in percentage.
- Returns:
Volume (absolute ot percentage)
- Return type:
Float
- cerr.dvh.meanDose(doseBinsV, volsHistV)[source]
This routine computes the mean dose
- Parameters:
doseBinsV – (List): vector of dose bin centers.
volsHistV (List) – vector of volumes accumulated in corresponding dose bins.
- Returns:
Mean dose
- Return type:
Float
- cerr.dvh.minDose(doseBinsV, volsHistV)[source]
This routine computes the minimum dose
- Parameters:
doseBinsV – (List): vector of dose bin centers.
volsHistV (List) – vector of volumes accumulated in corresponding dose bins.
- Returns:
Minimum dose
- Return type:
Float
- cerr.dvh.maxDose(doseBinsV, volsHistV)[source]
This routine computes the maximum dose
- Parameters:
doseBinsV – (List): vector of dose bin centers.
volsHistV (List) – vector of volumes accumulated in corresponding dose bins.
- Returns:
Maximum dose
- Return type:
Float
- cerr.dvh.medianDose(doseBinsV, volsHistV)[source]
This routine computes the median dose
- Parameters:
doseBinsV – (List): vector of dose bin centers.
volsHistV (List) – vector of volumes accumulated in corresponding dose bins.
- Returns:
Median dose
- Return type:
Float
- cerr.dvh.eud(doseBinsV, volsHistV, exponent)[source]
This routine computes the equivalent uniform dose given DVH and exponent.
- Parameters:
doseBinsV – (List): vector of dose bin centers.
volsHistV (List) – vector of volumes accumulated in corresponding dose bins.
exponent (int) – exponent.
- Returns:
EUD
- Return type:
Float
cerr.multiViewHelper module
Multiple viewer widget
This is an example on how to have more than one viewer in the same napari window. Additional viewers state will be synchronized with the main viewer. Switching to 3D display will only impact the main viewer.
This example also contain option to enable cross that will be moved to the current dims point (viewer.dims.point).
- cerr.multiViewHelper.center_cross_on_mouse(viewer_model: napari.components.viewer_model.ViewerModel)[source]
move the cross to the mouse position
- class cerr.multiViewHelper.own_partial(func, *args, **kwargs)[source]
Bases:
objectWorkaround for deepcopy not copying partial functions (Qt widgets are not serializable)
- class cerr.multiViewHelper.CrossWidget(*args: Any, **kwargs: Any)[source]
Bases:
QCheckBoxWidget to control the cross layer. because of the performance reason the cross update is throttled
cerr.plan_container module
This module defines the container class PlanC and methods to import metadata from DICOM and NifTI formats.
- cerr.plan_container.get_empty_list()[source]
Return an empty list, used as a default factory for dataclass fields.
- Returns:
An empty list.
- Return type:
list
- class cerr.plan_container.PlanC(header: Header = None, scan: List[Scan] = <factory>, structure: List[Structure] = <factory>, dose: List[Dose] = <factory>, beams: List[Beams] = <factory>, deform: List[Deform] = <factory>)[source]
Bases:
objectPlan Container for imaging metadata. Each Attribute of this class holds metadata for a particular type of imaging object. Additional attributes can be added to this class without breaking the functionality from other attributes.
- header
Header storing information about date of creation, version etc.
- scan
List of pyCERR’s scan objects for modalities such as CT, MR, PT or derived types.
- Type:
- structure
List of pyCERR’s structure objects for modalities such as RTSTRUCT, SEG or user defined segmentation masks.
- Type:
- dose
List of pyCERR’s dose objects for RTDOSE modality.
- Type:
- beams
List of pyCERR’s beams objects for RTPLAN modality.
- Type:
- deform
(List[cerr.dataclasses.deform.Deform]): List of pyCERR’s deformable image registration objects.
- Type:
- addScan(new_scan) -> Field(name='scan',type=typing.List[cerr.dataclasses.scan.Scan],default=<dataclasses._MISSING_TYPE object at 0x7d1cf0128380>,default_factory=<function get_empty_list at 0x7d1ce7155f80>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)[source]
Append a new scan object to the plan container’s scan list.
- Parameters:
new_scan (cerr.dataclasses.scan.Scan) – The scan object to add.
- class json_serialize(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]
Bases:
JSONEncoder- default(obj)[source]
Serialize pyCERR dataclass objects to JSON-compatible representations.
- Parameters:
obj – The object to serialize. Handled types are cerr.dataclasses.scan.Scan, cerr.dataclasses.dose.Dose, and cerr.dataclasses.structure.Structure.
- Returns:
- A dictionary containing the object’s UID, or an empty
string for unrecognized types.
- Return type:
dict
- cerr.plan_container.getSortedItems(itemList)[source]
Sort a list of H5 group-item names of the form
Item_Nby their numeric suffix.- Parameters:
itemList (list) – List of strings such as
['Item_2', 'Item_0', 'Item_1'].- Returns:
- The same items sorted in ascending numeric order, or the original
list unchanged if it is empty.
- Return type:
list
- cerr.plan_container.addToH5Grp(h5Grp, structDict, key)[source]
Write a single key from a dictionary into an HDF5 group as an attribute or dataset.
Scalar strings and numbers are stored as HDF5 attributes; lists and arrays are stored as compressed HDF5 datasets.
- Parameters:
h5Grp (h5py.Group) – The HDF5 group to write into.
structDict (dict) – Dictionary containing the data to write.
key (str) – The key in
structDictwhose value should be written.
- Returns:
The updated HDF5 group.
- Return type:
h5py.Group
- cerr.plan_container.saveToH5(planC, h5File, scanNumV=[], structNumV=[], doseNumV=[], deformNumV=[])[source]
Routine to serialize planC to H5 file
- Parameters:
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object
h5File (str) – File path/name to save planC
scanNumV – Indices for scan objects from planC.scan to export to h5 file
structNumV – Indices for structure objects from planC.structure to export to h5 file
doseNumV – Indices for dose objects from planC.dose to export to h5 file
deformNumV – Indices for deformation objects from planC.deform to export to h5 file
Returns:
- cerr.plan_container.saveNiiStructure(niiFileName, labelDict, planC, strNumV=None, dim=3)[source]
Function to export a pyCERR’s structure objects to NIfTi format mask/label map.
- Parameters:
niiFileName – string specifying path to output NIfTI file.
labelDict – dictionary mapping indices with structure names
planC – pyCERR plan_container object.
strNumV – [optional, default=None] list of structure indices to be exported.
dim – [optional, default=3]: writes a 3D array to nii, 4: writes 4D array to nii.
- Returns:
0 on successful export.
- cerr.plan_container.loadFromH5(h5File, initplanC='')[source]
Routine to load contents of H5 file into planC
- Parameters:
h5File (str) – File path/name of .h5 file containing matadata from planC
initplanC (cerr.plan_container.PlanC) – pyCERR’s plan container object
- Returns:
pyCERR’s plan container object with metadata imported from input H5 file.
- Return type:
- cerr.plan_container.saveH5Header(headerGrp, planC)[source]
Write planC header attributes into an HDF5 group.
- Parameters:
headerGrp (h5py.Group) – The HDF5 group that will receive the header data.
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object.
- Returns:
The updated HDF5 header group.
- Return type:
h5py.Group
- cerr.plan_container.saveH5Scan(scanGrp, scanNumV, planC)[source]
Write selected scan objects from planC into an HDF5 group.
- Parameters:
scanGrp (h5py.Group) – The HDF5 group that will receive the scan data.
scanNumV (list[int]) – Indices into
planC.scanidentifying which scans to export.planC (cerr.plan_container.PlanC) – pyCERR’s plan container object.
- Returns:
The updated HDF5 scan group.
- Return type:
h5py.Group
- cerr.plan_container.saveH5Dose(structGrp, structNumV, planC)[source]
Write selected dose objects from planC into an HDF5 group.
- Parameters:
structGrp (h5py.Group) – The HDF5 group that will receive the dose data.
structNumV (list[int]) – Indices into
planC.doseidentifying which dose objects to export.planC (cerr.plan_container.PlanC) – pyCERR’s plan container object.
- Returns:
The updated HDF5 dose group.
- Return type:
h5py.Group
- cerr.plan_container.saveH5Deform(deformGrp, deformNumV, planC)[source]
Write selected deformation objects from planC into an HDF5 group.
- Parameters:
deformGrp (h5py.Group) – The HDF5 group that will receive the deformation data.
deformNumV (list[int]) – Indices into
planC.deformidentifying which deformation objects to export.planC (cerr.plan_container.PlanC) – pyCERR’s plan container object.
- Returns:
The updated HDF5 deformation group.
- Return type:
h5py.Group
- cerr.plan_container.saveH5Structure(structGrp, structNumV, planC)[source]
Write selected structure objects from planC into an HDF5 group.
Each structure’s contour segments are serialised recursively into nested HDF5 sub-groups.
- Parameters:
structGrp (h5py.Group) – The HDF5 group that will receive the structure data.
structNumV (list[int]) – Indices into
planC.structureidentifying which structures to export.planC (cerr.plan_container.PlanC) – pyCERR’s plan container object.
- Returns:
The updated HDF5 structure group.
- Return type:
h5py.Group
- cerr.plan_container.readAttribsAndDsets(obj, h5Grp, excludeKeys=[])[source]
Populate a Python object’s fields from matching HDF5 attributes and datasets.
Scalar fields stored as HDF5 attributes are decoded from bytes when necessary. Array fields stored as HDF5 datasets are loaded via slice notation. Fields listed in
excludeKeysare skipped.- Parameters:
obj – Any object whose
__dict__fields should be populated.h5Grp (h5py.Group) – The HDF5 group containing attributes and datasets that correspond to
obj’s fields.excludeKeys (list[str]) – Optional list of field names to skip.
- Returns:
The same object with fields populated from the HDF5 group.
- Return type:
obj
- cerr.plan_container.loadH5Header(headerGrp, planC)[source]
Load header metadata from an HDF5 group into planC.
- Parameters:
headerGrp (h5py.Group) – The HDF5 group containing header attributes.
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object to update.
- Returns:
The updated plan container with header populated.
- Return type:
- cerr.plan_container.loadH5Scan(scanGrp, planC)[source]
Load scan objects from an HDF5 group into planC, skipping duplicates.
Each
Item_Nsub-group inscanGrpis deserialised into acerr.dataclasses.scan.Scanobject together with its associatedscanInfoentries. Scans whosescanUIDalready exists inplanC.scanare skipped with a warning.- Parameters:
scanGrp (h5py.Group) – The HDF5 group containing serialised scan items.
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object to update.
- Returns:
The updated plan container with scans appended.
- Return type:
- cerr.plan_container.loadH5Deform(deformGrp, planC)[source]
Load deformation objects from an HDF5 group into planC, skipping duplicates.
Each
Item_Nsub-group indeformGrpis deserialised into acerr.dataclasses.deform.Deformobject. Deformations whosedeformUIDalready exists inplanC.deformare skipped with a warning.- Parameters:
deformGrp (h5py.Group) – The HDF5 group containing serialised deformation items.
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object to update.
- Returns:
The updated plan container with deformations appended.
- Return type:
- cerr.plan_container.loadH5Dose(doseGrp, planC)[source]
Load dose objects from an HDF5 group into planC, skipping duplicates.
Each
Item_Nsub-group indoseGrpis deserialised into acerr.dataclasses.dose.Doseobject. Dose objects whosedoseUIDalready exists inplanC.doseare skipped with a warning.- Parameters:
doseGrp (h5py.Group) – The HDF5 group containing serialised dose items.
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object to update.
- Returns:
The updated plan container with doses appended.
- Return type:
- cerr.plan_container.loadH5Strucutre(structGrp, planC)[source]
Load structure objects from an HDF5 group into planC, skipping duplicates.
Each
Item_Nsub-group instructGrpis deserialised into acerr.dataclasses.structure.Structureobject together with its contour and segment data. Structures whosestrUIDalready exists inplanC.structureare skipped with a warning.- Parameters:
structGrp (h5py.Group) – The HDF5 group containing serialised structure items.
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object to update.
- Returns:
The updated plan container with structures appended.
- Return type:
- cerr.plan_container.loadDcmDir(dcmDir, opts={}, initplanC='')[source]
This routine imports metadata from DICOM directory and sub-directories into an instance of PlanC.
- Parameters:
dcmDir (str) – absolute path to directory containing dicom files
opts (dict) –
dictionary of import options. Currently supported options are:
’suvType’: Choose from ‘BW’, ‘BSA’, ‘LBM’, ‘LBMJANMA’
’groupByAcquisitionNumber’: Choose from True, False (default)
e.g.
opts = {'suvType': 'LBM', 'groupByAcquisitionNumber': True}initplanC (PlanC) – An instance of PlanC to add the metadata. If not specified, metadata is added to an empty PlanC instance
- Returns:
An instance of PlanC with metadata populated from DICOM files in dcm_dir
- Return type:
- cerr.plan_container.populatePlanCField(field_name, file_list, opts={})[source]
Load imaging metadata from a list of DICOM files into the appropriate pyCERR dataclass.
- Parameters:
field_name (str) – The planC field to populate. Accepted values are
'scan','structure','dose', and'beams'.file_list (pandas.Series or list) – Collection of DICOM file paths belonging to a single series/modality group.
opts (dict) – Optional import options forwarded to the underlying loader. Recognised keys include
'suvType'.
- Returns:
- A list of dataclass objects corresponding to
field_name (e.g. a list of
cerr.dataclasses.scan.Scanforfield_name='scan').
- A list of dataclass objects corresponding to
- Return type:
list
- cerr.plan_container.loadScanFromDB(sacnInfoList, niiFile, initplanC='')[source]
This routine imports scan from a list of scanInfo dicts and scanArray into planC
- Parameters:
sacnInfoList (list) – List of dictionaries whose fields corresponsd to scanInfo fields
niiFile (np.ndarray) – 3D array of size numRows x numCols x numSlices, where the slice-dimension corresponds to entries in sacnInfoList
initplanC (cerr.plan_container.PlanC) – optional, pyCERR’s plan container object to append the scan
- Returns:
pyCERR’s plan container object with scan imported to planC.scan[-1]
- Return type:
- cerr.plan_container.loadPlanCFromPkl(file_name='')[source]
Load a planC object previously serialised with Python’s pickle module.
- Parameters:
file_name (str) – Path to the pickle file to load.
- Returns:
The deserialised plan container object.
- Return type:
- cerr.plan_container.loadNiiScan(nii_file_name, imageType='CT SCAN', direction='', initplanC='')[source]
This routine imports scan from NifTi file into planC
- Parameters:
nii_file_name (str) – path of NifTi file containing the scan
imageType (str) – typte of scan. e.g. ‘CT SCAN’, ‘MR SCAN’, ‘PT SCAN’
direction (str) – optional, the desired orientation of scan. e.g. HFS
initplanC (cerr.plan_container.PlanC) – optional, pyCERR’s plan container object to append the scan
- Returns:
pyCERR’s plan container object with scan imported to planC.scan[-1]
- Return type:
- cerr.plan_container.loadNiiDose(nii_file_name, assocScanNum, planC, fractionGroupID='RT-dose')[source]
Load a dose distribution from a NIfTI file into planC.
- Parameters:
nii_file_name (str) – Path to the NIfTI file containing the dose array.
assocScanNum (int) – Index into
planC.scanof the scan associated with this dose distribution.planC (cerr.plan_container.PlanC) – pyCERR’s plan container object to which the dose will be appended.
fractionGroupID (str) – Optional label for the fraction group. Defaults to
'RT-dose'.
- Returns:
- The updated plan container with the dose
appended to
planC.dose.
- Return type:
- cerr.plan_container.loadNiiStructure(nii_file_name, assocScanNum, planC, labels_dict={})[source]
This routine imports segmentation from NifTi file into planC
- Parameters:
nii_file_name (str) – path of NifTi file containing the structure/s
assocScanNum (int) – index of scan from planC.scan associated with segmentation
planC (cerr.plan_container.PlanC) – optional, pyCERR’s plan container object to append structure/s
labels_dict (dict) – optional, dictionary mapping structure names to labels. e.g. {‘GTV’:1, ‘Lung_total’:2}
- Returns:
pyCERR’s plan container object with structure/s imported to planC.structure
- Return type:
- cerr.plan_container.loadNiiVf(dvf_file, baseScanNum, planC)[source]
This routine loads deformation vector field from file into planC
- Parameters:
dvf_file (str) – path to file containing the DFV
baseScanNum (int) – index of scan from planC.scan
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object to append vector field
- Returns:
pyCERR’s plan container object with vector field imported to planC.deform
- Return type:
- cerr.plan_container.importScanArray(scan3M, xV, yV, zV, modality, assocScanNum, planC)[source]
This routine imports a scan from numpy array into planC
- Parameters:
scan3M (numpy.ndarray)
xV (numpy.ndarray)
yV (numpy.ndarray)
zV (numpy.ndarray)
modality (str)
assocScanNum (int)
planC (cerr.plan_container.PlanC)
- Returns:
pyCERR’s plan container object with scan imported to planC.scan
- Return type:
- cerr.plan_container.importDoseArray(dose3M, xV, yV, zV, planC, assocScanNum, doseInfo=None)[source]
This routine imports rt dose from numpy array into planC
- Parameters:
dose3M (numpy.ndarray) – 3D dose array
xV (numpy.ndarray) – x-coordinates of dose grid
yV (numpy.ndarray) – y-coordinates of dose grid
zV (numpy.ndarray) – z-coordinates of dose grid
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object
assocScanNum (int) – Index of scan associated with dose
[Optional (doseInfo) – None]: Dictionary specifying ‘fractionGroupID’, and ‘units’.
- Returns:
pyCERR’s plan container object with scan imported to planC.scan
- Return type:
- cerr.plan_container.importStructureMask(mask3M, assocScanNum, structName, planC, structNum=None)[source]
- Parameters:
mask3M (numpy.ndarray) – binary mask containing segmentation
assocScanNum (int) – index of scan from planC.scan associated with segmentation
structName (str) – name of structure
planC (cerr.plan_container.PlanC) – pyCERR’s plan container object
structNum (int or None) – optional, index of structure object within planC.structure to replace
- Returns:
pyCERR’s plan container object with structure imported to planC.structure
- Return type:
- cerr.plan_container.parseDcmHeader(fileList)[source]
This routine parses header from DICOM files in the input directory
- Parameters:
fileList (list) – list of DICOM files
- Returns:
Data frame containing header values of DICOM files. The header attributes consist of “PatientName”,”PatientID”,”StudyInstanceUID”,”SeriesInstanceUID”,”Modality”, “bValue”,”TemporalPosition”,”TriggerTime”,”NumSlices”,”FilePath”
- Return type:
pandas.DataFrame