Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Renderers #9

Open
HAL899 opened this issue Jan 20, 2025 · 4 comments
Open

Implement Renderers #9

HAL899 opened this issue Jan 20, 2025 · 4 comments

Comments

@HAL899
Copy link
Contributor

HAL899 commented Jan 20, 2025

No description provided.

@nTerior nTerior self-assigned this Jan 20, 2025
@nTerior nTerior changed the title Implement Renderer Implement Renderers Jan 20, 2025
@HAL899 HAL899 self-assigned this Jan 20, 2025
@HAL899
Copy link
Contributor Author

HAL899 commented Jan 26, 2025

26.01.25
Implementation of Facorty method in SequenceRenderer.

Added Enum RenderTypes to address the different subclasses of SequenceRenderer.
Added abstract method GetRenderType to SequenceRenderer.
Added abstract Create method to SequenceRenderer.

The problem is that the different subclasses of SequenceRenderer require different paramters for initialization.
To solve this, SequenceRenderer uses the specific Create method in the subclasses and passes an in array of parameters for initialization. These parameters are specific for the subclasses.

Added abstract CheckParameters method to SequenceRenderer.
As the parameters are specific for each subclass, the subclasses have to check, if the parameters are valid for them.
Some parameters (e.g. an index of a ChannelRed for ChannelMapRenderer) are only valid if the sequence matches a certain format (e.g. has enough channels). The sequence however is currently unknown during initialization of the renderers.
Will add sequence as an attribute of the SequenceRenderer subclasses.

@HAL899
Copy link
Contributor Author

HAL899 commented Jan 26, 2025

Moved NormalizeIntesities from ChannelMapRenderer to SequenceRenderer.
Normalizing intensities is required for almost all renderers. Not every renderer should implement an own method for doing so

@HAL899
Copy link
Contributor Author

HAL899 commented Jan 26, 2025

**Altered HeatmapRenderer to allow for a correct usage of GetColor with the given relMaxColdestIntensities and relMinHottestIntensities. **
The values of MaxColdestIntensitites and MinHottestIntensities were between 0 and 1, but this is a problem, if the intensities of the channels are not between 0 and 1. The values were not normalized to the Intensities of the channels. This was solved by adding _absMaxColdestIntensisties and _absMinHottestIntensities. These are private and store the absolute intensity values, calculated using the relative versions and the intensity range of the channels

@HAL899
Copy link
Contributor Author

HAL899 commented Jan 26, 2025

Added abstract class ArgMaxRenderer and concrete Subclass ArgMaxRendererGrey.
The ArgMaxRenderer has to check all intensities of all pixels. Thus this renderer will most likely be one of the slowest. It is hard to make it more efficient, since all channels of all pixels have to be accessed.

@HAL899 HAL899 removed their assignment Jan 27, 2025
@nTerior nTerior removed their assignment Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants