You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Following on from this post I am experiencing an increasing need to be able to instantiate a Pylinac analysis class such as CatPhan604 from a Pydicom data set. The solution I described only works for 2D analysis like PicketFence and is not terribly efficient.
Describe the solution you'd like
I would like to do something along the lines of:
datasets = [list of pydicom FileDataSet]
ct = CatPhan604(datasets)
ct.analyze()
Describe alternatives you've considered
I've considered a few possible options
Allow creating an empty class, i.e with folder path None or an empty string, and then manually assign the datasets.
Create the class from an existing DicomImageStack. DicomImageStack and DicomImage will need .from_dataset functions
Create the class from a Pydicom data set by implementing a .from_dataset function. By implication this will require the first option.
I think 2 is the most viable and opens up the possibility of possibility of opening an image or series of images, performing some operations on them and then passing them to an analysis. It will require, though, changes to DicomImageStack, LazyDicomImageStack and DicomImage.
Additional context
The restriction to store image files on disk was understandable ten years ago when computer memory was at a premium, but these days even modest laptops have enough memory. The performance hit, even writing to an SSD, to my mind outweighs the requirement to conserve memory.
Regards
Alan
The text was updated successfully, but these errors were encountered:
I definitely like option 2 and 3 as single images can be constructed from .from_dataset so the consistency makes sense.
Loading from disk was indeed the initial assumption in 2014. You can read from a stream (not a dataset) currently by doing something like:
# read from streams
streams = [io.BytesIO(f.read_bytes()) for f in Path(r"path/to/files").iterdir()]
cbct = QuartDVT(streams)
cbct.analyze()
cbct.plot_analyzed_image()
but that is relatively kludgy. Definitely on board w/ loading straight from a dataset. In fact, at one point internally we thought of loading from dataset to be the default and then loading from disk as the classmethod (since the dataset is loaded from disk and then passed to init vs the other way around) but that was a breaking change.
but these days even modest laptops have enough memory. The performance hit, even writing to an SSD, to my mind outweighs the requirement to conserve memory.
This is obviously clinic and system dependent. In RadMachine memory is at a premium (in the cloud app disk == memory); we load zipped datasets straight from a stream.
Is your feature request related to a problem? Please describe.
Following on from this post I am experiencing an increasing need to be able to instantiate a Pylinac analysis class such as CatPhan604 from a Pydicom data set. The solution I described only works for 2D analysis like PicketFence and is not terribly efficient.
Describe the solution you'd like
I would like to do something along the lines of:
Describe alternatives you've considered
I've considered a few possible options
I think 2 is the most viable and opens up the possibility of possibility of opening an image or series of images, performing some operations on them and then passing them to an analysis. It will require, though, changes to DicomImageStack, LazyDicomImageStack and DicomImage.
Additional context
The restriction to store image files on disk was understandable ten years ago when computer memory was at a premium, but these days even modest laptops have enough memory. The performance hit, even writing to an SSD, to my mind outweighs the requirement to conserve memory.
Regards
Alan
The text was updated successfully, but these errors were encountered: