Comments (8)
In the above screenshot you export the study. In your script, you try to export only the segmentation, instead of the study, which would be the correct way.
We prefer questions asked in the Slicer discourse forum for better visibility. Here please report bugs. Thank you.
from slicerrt.
Can you give me an instruction how to export study with DicomRTImportExportPlugin in Python Script. I've tried many ways but still can't make it. :(
from slicerrt.
As I said you try to export the segmentation: exporter.examineForExport(segmentationShItem)
and instead you need to export the study: exporter.examineForExport(studyShItem)
from slicerrt.
from slicerrt.
I see. It seems you need to run the examineForExport
function on all the series you want to export (the segmentation and the CT), collect the returned exportables in a list, and and pass that list for the export
function.
At least this is what the GUI does, see
https://github.com/Slicer/Slicer/blob/master/Modules/Scripted/DICOMLib/Widgets/qSlicerDICOMExportDialog.cxx#L271
from slicerrt.
OMG! It was actually worked ! Thanks you so much for helping for me <3
from slicerrt.
Perfeft, thank you! Closing the issue then.
from slicerrt.
Hello,
I am kinda new with python. Can you explain to me how you manage to solve this issue?
I tried to run the ExamineForExport function on the volume and the segmentations, then past them in a list for the export function, but it did not worked:
exporter = DicomRtImportExportPlugin.DicomRtImportExportPluginClass()
exportable1 = exporter.examineForExport(segmentationShItem)
exportable2 = exporter.examineForExport(referenceVolumeShItem)
for exp in exportable1:
exp.directory=outputFolder
for exp in exportable2:
exp.directory=outputFolder
exportables = [exportable1,exportable2]
exporter.export(exportables)
Traceback (most recent call last):
File “”, line 1, in
File “C:/Users/tmp/AppData/Roaming/NA-MIC/Extensions-29402/SlicerRT/lib/Slicer-4.11/qt-scripted-modules/DicomRtImportExportPlugin.py”, line 122, in export
exportable.copyToVtkExportable(vtkExportable)
AttributeError: ‘list’ object has no attribute ‘copyToVtkExportable’
thanks !
from slicerrt.
Related Issues (20)
- BatchStructureSetConversion doesn't work with my dicom HOT 6
- Plastimatch build fails HOT 1
- Problem with loading RTPLAN in Slicer version 4.13.0-2021-11-05 r30381 HOT 2
- Linux SlicerRT (Plastimatch) build is failed after Slicer ITK 5.3 update HOT 3
- Fix Isodose module crash by using color legend instead of scalar bars HOT 1
- slicer RT make radiotherapy plan HOT 6
- Plastimatch failing to build with Cxx17
- Plastimatch changes for C++17 compilation under Linux and Mac HOT 4
- Update ExternalBeamPlanning module to use markup ROI instead of annotation ROI
- Allow loading user defined treatment machines in Room's Eye View HOT 41
- Compilation error in plastimatch because of redefinition of DirectionType HOT 2
- Isodose calculation replaces previously created isodose HOT 6
- Isodose model generation fails due to non-default FeatureAngle value HOT 9
- Non standard characters lost transferring to DICOM database
- RTSTRUCT not loaded Slicer5.2.2, SlicertRT from 02/22/23 HOT 2
- Set required DICOM reference between dose and CT HOT 2
- Fix patient support rotation angle to fixed reference HOT 1
- TROTS dataset HOT 11
- Resolving SlicerRT Module Issues HOT 4
- Fix Vff file loading with latest scanners
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slicerrt.