How can I detect dose in a specific region in DICOM example?

I am working with the DICOM example in GEANT4.

My goal is to determine the dose deposited in a specific region, modeled as a small detector in the shape of a disk or cylinder. This means restricting the area to collect only the voxels within this region that received a dose, instead of calculating the dose deposited in all voxels of my model.

If you have any suggestion I would be great full.

You can write your own class inheriting from G4VSDFilter and there filter tracks when they are in one of the voxels you are interested on (by position or voxel ID). But you should first define what do you mean by “a voxel is inside the cylinder” (e.g. voxel center is inside, > 50% of voxel volume is inside, …)