# Isodose Generation

**URL:** <https://discourse.slicer.org/t/isodose-generation/20115>\
**Category:** Support\
**Tags:** rtdose\
**Created:** [October 12, 2021, 1:12pm UTC](https://discourse.slicer.org/t/isodose-generation/20115 "2021-10-12T13:12:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cody\_Xie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cody_xie/32/10261_2.png) [@Cody\_Xie](https://discourse.slicer.org/u/Cody_Xie)\
**Post date:** [October 12, 2021, 1:12pm UTC](https://discourse.slicer.org/t/isodose-generation/20115/1 "2021-10-12T13:12:36Z")

</div>

Hi all,

I would like to create **isodose** and the **color bar**. I followed the isodose tutorial ([SlicerRtDoc/tutorials/SlicerRT\_Tutorial\_Isodose.pptx at master · SlicerRt/SlicerRtDoc · GitHub](https://github.com/SlicerRt/SlicerRtDoc/blob/master/tutorials/SlicerRT_Tutorial_Isodose.pptx)). However, in the Isodose feature I could only edit the number of iso levels, but **cannot change** the **color** , **dose** and **Opacity** for each level by double clicking (please see the picture below).

 ![Isodose_Slicer](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/1/31da5b85ed46b23b09a25429cdddf898fcaec8f1.jpeg)

 ![Isodose_Slicer_Instruction](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/2/423949c62aa04f393cc82421f1c655250e35f409.png)

Could you give me some help? Thank you so much!

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 13, 2021, 4:31am UTC](https://discourse.slicer.org/t/isodose-generation/20115/2 "2021-10-13T04:31:05Z")

</div>

@cpinter @Sunderlandkyl is there a reason why the color table entries are editable only if “Relative isolevels of dose” option is enabled in Isodose module?

---

<div class="post-metadata">

**Author:** ![Cody\_Xie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cody_xie/32/10261_2.png) [@Cody\_Xie](https://discourse.slicer.org/u/Cody_Xie)\
**Post date:** [October 13, 2021, 7:03am UTC](https://discourse.slicer.org/t/isodose-generation/20115/3 "2021-10-13T07:03:51Z")

</div>

Hi Andrass, thank you co much for your reply! And yes, that’s exactly the problem I have. The color table is only editable if “Relative isolevels of dose” option is checked.

 ![Isodose_](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/6/5/651982637c810a78efd0dee47f168a6f538b847b.jpeg)

@lassoan @cpinter @Sunderlandkyl I appreciate any help from your side!

---

<div class="post-metadata">

**Author:** ![Mik](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mik](https://discourse.slicer.org/u/Mik)\
**Post date:** [October 13, 2021, 7:23am UTC](https://discourse.slicer.org/t/isodose-generation/20115/4 "2021-10-13T07:23:01Z")

</div>

I think the problem is not only in “Isodose” module. You can’t modify that color table in the “Colors” module as well. “Isodose\_ColorTable\_Relative” can be edited, but “Isodose\_ColorTable\_Default” is blocked for editing.

---

<div class="post-metadata">

**Author:** ![Mik](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mik](https://discourse.slicer.org/u/Mik)\
**Post date:** [October 13, 2021, 8:56am UTC](https://discourse.slicer.org/t/isodose-generation/20115/5 "2021-10-13T08:56:06Z")

</div>

@Cody_Xie @cpinter @Sunderlandkyl

The problem in that part of [code](https://github.com/SlicerRt/SlicerRT/blob/master/Isodose/Logic/vtkSlicerIsodoseModuleLogic.cxx#L98-L107).

Logic loads default (absolute dose) color table, and creates relative dose color table, if both color table are created without loading, both absolute and relative doses are available for editing.

Possible solution

```auto
//---------------------------------------------------------------------------
void vtkSlicerIsodoseModuleLogic::SetMRMLSceneInternal(vtkMRMLScene* newScene)
{
  vtkNew<vtkIntArray> events;
  events->InsertNextValue(vtkMRMLScene::NodeAddedEvent);
  events->InsertNextValue(vtkMRMLScene::NodeRemovedEvent);
  events->InsertNextValue(vtkMRMLScene::EndCloseEvent);
  events->InsertNextValue(vtkMRMLScene::EndBatchProcessEvent);
  this->SetAndObserveMRMLSceneEvents(newScene, events.GetPointer());

    // Create isodose color tables
    vtkSlicerIsodoseModuleLogic::CreateDefaultDoseColorTable(newScene);
    vtkSlicerIsodoseModuleLogic::CreateRelativeDoseColorTable(newScene);
}

```

---

<div class="post-metadata">

**Author:** ![Cody\_Xie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cody_xie/32/10261_2.png) [@Cody\_Xie](https://discourse.slicer.org/u/Cody_Xie)\
**Post date:** [October 13, 2021, 10:29am UTC](https://discourse.slicer.org/t/isodose-generation/20115/6 "2021-10-13T10:29:57Z")

</div>

Hi Mik,

many thanks for pointing it out!

Besides, may I know if you have the similar problem when you create isodose surfaces? The dose will be enlarged after clicking “Create isodose surfaces”. I posted a new topic here [Dose will be distorted when creating isodose surfaces](https://discourse.slicer.org/t/dose-will-be-distorted-when-creating-isodose-surfaces/20129)

Thank you so much!

---

<div class="post-metadata">

**Author:** ![cpinter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cpinter/32/7995_2.png) [@cpinter](https://discourse.slicer.org/u/cpinter)\
**Post date:** [October 13, 2021, 10:55am UTC](https://discourse.slicer.org/t/isodose-generation/20115/7 "2021-10-13T10:55:44Z")

</div>

Good catch @Mik ! This issue with color tables that they are not editable sometimes has been around for a good while, but I wasn’t aware that it affected one of the isodose color tables. If it’s not easy to make it editable then a workaround could be added that creates a new editable one and copies the colors from the loaded one.

---

<div class="post-metadata">

**Author:** ![Mik](https://avatars.discourse-cdn.com/v4/letter/m/958977/32.png) [@Mik](https://discourse.slicer.org/u/Mik)\
**Post date:** [October 13, 2021, 11:24am UTC](https://discourse.slicer.org/t/isodose-generation/20115/8 "2021-10-13T11:24:59Z")

</div>

I will try to look at that bug.

---

<div class="post-metadata">

**Author:** ![Cody\_Xie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cody_xie/32/10261_2.png) [@Cody\_Xie](https://discourse.slicer.org/u/Cody_Xie)\
**Post date:** [October 13, 2021, 11:30am UTC](https://discourse.slicer.org/t/isodose-generation/20115/10 "2021-10-13T11:30:59Z")

</div>

Thank yo so much Mik! 😃

---

<div class="post-metadata">

**Author:** ![Cody\_Xie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cody_xie/32/10261_2.png) [@Cody\_Xie](https://discourse.slicer.org/u/Cody_Xie)\
**Post date:** [October 20, 2021, 12:41pm UTC](https://discourse.slicer.org/t/isodose-generation/20115/11 "2021-10-20T12:41:24Z")

</div>

@lassoan @cpinter Hello Andras and Csaba, may I know why I cannot download and install the Preview Release Slicer (built by 2021-10-20)? The size of the .zip file looks wrong. Thank you so much!

 ![Slicer_Properties](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/d/4d44115045fa521bb97ea87c194e692b061d3141.png)  
 ![Error](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/7/3/73accb6b53f855b3bbd485848fe62989f46d78cb.png)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 20, 2021, 2:42pm UTC](https://discourse.slicer.org/t/isodose-generation/20115/12 "2021-10-20T14:42:57Z")

</div>

There was a download server failure yesterday - see here for details and workaround: [Slicer Preview Release package for Windows failed to upload](https://discourse.slicer.org/t/slicer-preview-release-package-for-windows-failed-to-upload/20264)

---

<div class="post-metadata">

**Author:** ![Cody\_Xie](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/cody_xie/32/10261_2.png) [@Cody\_Xie](https://discourse.slicer.org/u/Cody_Xie)\
**Post date:** [October 20, 2021, 5:52pm UTC](https://discourse.slicer.org/t/isodose-generation/20115/13 "2021-10-20T17:52:18Z")

</div>

Thank you so much Andras! It works fine now
